Problem 1: if you use string translation to translate the email notification text then the call to i18n_string_translate() will sanitize it. That's bad because it breaks links in HTML email for example. If there is no translation applied then we also don't sanitize the text, so this should be fine.

On the other hand we should sanitize the tokens that are used in the mail, especially [privatemsg_message:body] if that is used.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi’s picture

Status: Active » Needs review
FileSize
1.32 KB

Patch attached.

klausi’s picture

FileSize
1.8 KB

Argl, forgot the actual mail text function.

ptmkenny’s picture

Status: Needs review » Needs work

Changing status to re-queue the test; for some reason, it looks like the test got postponed.

ptmkenny’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: privatemsg-email-sanitize-2457813-2.patch, failed testing.

gunwald’s picture

In my humble opinion this is not the way to go: Translated mail notifications should absolutely be sanitized! But you should not use the string translation interface to translate the message text. Instead the module has to be patched to make the drupal variables, which are used to store the text of the notifications messages, translatable with i18n.
See this issue.
You find a patch there to make the variables translatable, please test it against the dev.

Triumphent’s picture

@gunwald: The patch link doesn't work.

ivnish’s picture

Status: Needs work » Closed (outdated)