]> git.mxchange.org Git - friendica.git/blobdiff - mod/message.php
Fix off-by-one error in Message ID header count check in Util\Emailer
[friendica.git] / mod / message.php
index 1c6502ee1593fe36822a0bbb4ea5075e4df13f40..a07c8b44931284ca72757ebef8df8e0ccc2b3a70 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -70,10 +70,10 @@ function message_post(App $a)
                return;
        }
 
-       $replyto   = !empty($_REQUEST['replyto'])   ? Strings::escapeTags(trim($_REQUEST['replyto'])) : '';
-       $subject   = !empty($_REQUEST['subject'])   ? Strings::escapeTags(trim($_REQUEST['subject'])) : '';
-       $body      = !empty($_REQUEST['body'])      ? Strings::escapeHtml(trim($_REQUEST['body']))    : '';
-       $recipient = !empty($_REQUEST['recipient']) ? intval($_REQUEST['recipient'])                  : 0;
+       $replyto   = !empty($_REQUEST['replyto'])   ? trim($_REQUEST['replyto'])                   : '';
+       $subject   = !empty($_REQUEST['subject'])   ? trim($_REQUEST['subject'])                   : '';
+       $body      = !empty($_REQUEST['body'])      ? Strings::escapeHtml(trim($_REQUEST['body'])) : '';
+       $recipient = !empty($_REQUEST['recipient']) ? intval($_REQUEST['recipient'])               : 0;
 
        $ret = Mail::send($recipient, $body, $subject, $replyto);
        $norecip = false;
@@ -308,7 +308,7 @@ function message_content(App $a)
                        $body_e = BBCode::convertForUriId($message['uri-id'], $message['body']);
                        $to_name_e = $message['name'];
 
-                       $contact = Contact::getByURL($message['from-url'], false, ['thumb', 'addr', 'id', 'avatar']);
+                       $contact = Contact::getByURL($message['from-url'], false, ['thumb', 'addr', 'id', 'avatar', 'url']);
                        $from_photo = Contact::getThumb($contact);
 
                        $mails[] = [
@@ -440,7 +440,7 @@ function render_messages(array $msg, $t)
                        continue;
                }
 
-               $contact = Contact::getByURL($rr['url'], false, ['thumb', 'addr', 'id', 'avatar']);
+               $contact = Contact::getByURL($rr['url'], false, ['thumb', 'addr', 'id', 'avatar', 'url']);
                $from_photo = Contact::getThumb($contact);
 
                $rslt .= Renderer::replaceMacros($tpl, [