Page MenuHomePhabricator

Sending emails to an account containing non-US-ASCII characters fails if it also contains a period
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue

  • Visit Special:CreateAccount as Admin
  • Create an account containing a non-US-ASCII character and a period, for example Jöhn.Döe using "sending a temporary random password to an email address"

What happens?

  • No email containing the temporary password is sent to the email address provided

What should have happened instead?

  • An email containing the temporary password is sent to the email address provided

Software version:

  • MW-1.35
  • MW-1.39

Event Timeline

Mwgit renamed this task from Sending emails to accounts containing non-US-ASCII characters fails if it also contains a period to Sending emails to an account containing non-US-ASCII characters fails if it also contains a period.Jan 27 2023, 4:43 PM
Mwgit updated the task description. (Show Details)

When encoding email header fields, the encoded words must not contain characters listed in "especials" in RFC 2047, section 2. This is only taken into account partially in UserMailer::quotedPrintable.
Changing the line

$replace = $illegal . '\t ?_';

to

$replace = $illegal . '\t ?_()<>@,;:"\/\[\].';

fixes the issue.

Doesn't the period want quoting there?

Doesn't the period want quoting there?

$replace is enclosed in [] later and the period doesn't need to be quoted there.