Skip to content

Commit

Permalink
Fix for messages' quotes being escaped in sent out mails
Browse files Browse the repository at this point in the history
  • Loading branch information
diptobi1 committed Oct 24, 2022
1 parent 9c22722 commit 5d56abc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modforum/libMessage.php
Original file line number Diff line number Diff line change
@@ -98,7 +98,12 @@ static public function send($toID, $fromUserID, $message, $subject="", $type='Bu
{
require_once(l_r('objects/mailer.php'));
$Mailer = new Mailer();
$Mailer->Send(array($sendMailTo=>$sendMailTo), $subject, self::linkifyWithAbsPaths($message), 'mod');
$Mailer->Send(array($sendMailTo=>$sendMailTo), $subject, stripslashes(self::linkifyWithAbsPaths($message)), 'mod');
/* Note on stripslashes:
* By design / architecture $DB->msg_escape is called much earlier in execution and results in the message being also excaped with respect to quotes.
* We decide to revert the quote escapes here for sending out the mail instead of passing an unescaped message down since changing the current
* behavior in this one case just seems to dangerous. Unescaped strings could too easily end up in the DB and mess things up there.
*/
}

if( $type === 'ThreadReply' )

0 comments on commit 5d56abc

Please sign in to comment.