From: Michael Vogel Date: Tue, 15 Mar 2016 19:14:08 +0000 (+0100) Subject: Values are sanitized, messages are not relayed when there is no signature X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b84ed78f8f49d75d5f08a7e051fe0d7c2e2d6970;p=friendica.git Values are sanitized, messages are not relayed when there is no signature --- diff --git a/include/diaspora.php b/include/diaspora.php index d5f2a21d9e..f4e3132959 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -221,7 +221,9 @@ class diaspora { logger('Message verified.'); - return array('message' => $inner_decrypted, 'author' => $author_link, 'key' => $key); + return array('message' => (string)$inner_decrypted, + 'author' => unxmlify($author_link), + 'key' => (string)$key); } @@ -1801,7 +1803,8 @@ class diaspora { if ($data->photo) { foreach ($data->photo AS $photo) - $body = "[img]".$photo->remote_photo_path.$photo->remote_photo_name."[/img]\n".$body; + $body = "[img]".unxmlify($photo->remote_photo_path). + unxmlify($photo->remote_photo_name)."[/img]\n".$body; $datarray["object-type"] = ACTIVITY_OBJ_PHOTO; } else { @@ -2355,8 +2358,10 @@ class diaspora { $r = q("SELECT `signed_text`, `signature`, `signer` FROM `sign` WHERE `".$sql_sign_id."` = %d LIMIT 1", intval($item["id"])); - if (!$r) - return self::send_followup($item, $owner, $contact, $public_batch); + if (!$r) { + logger("Couldn't fetch signatur for contact ".$contact["addr"]." at item ".$item["guid"]." (".$item["id"].")", LOGGER_DEBUG); + return false; + } $signature = $r[0];