Last modified: 2013-10-23 07:16:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32260, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30260 - Unknown error in PHP's mail() function when trying to send confirmation mail
Unknown error in PHP's mail() function when trying to send confirmation mail
Status: NEW
Product: MediaWiki
Classification: Unclassified
Email (Other open bugs)
1.19
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-06 08:19 UTC by Michael M.
Modified: 2013-10-23 07:16 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael M. 2011-08-06 08:19:52 UTC
When I try to confirm the e-mail address for my account [[de:Benutzer:X" onclick="alert('XSS');" title="y]] I always get:

Wikipedia could not send your confirmation mail. Please check your e-mail address for invalid characters.

Mailer returned: Unknown error in PHP's mail() function

I tried it with different mail addresses (including the one I'm using here and the one for my main account, which I could confirm without problem), so it's probably not the mail address but the user name that makes problems.
Comment 1 Brion Vibber 2011-08-06 11:06:16 UTC
Incidentally, love the username. ;) http://xkcd.com/327/

It should be getting quoted-printabled ... Running the username with a sample address through MailAddress's formatting gives:

=?UTF-8?Q?X"=20onclick=3D"alert('XSS');"=20title=3D"y?= <foo@bar>

I suspect it's the semicolon that gives the problem; if there's a '.' or ',' we wrap the whole bit in additional quotes, but not for semicolon. I'll do some tests.
Comment 2 Brion Vibber 2011-08-06 11:18:19 UTC
This actually sends through fine on my dev machine's default mailer. Someone'll probably want to check error logs, I'm not sure what's in use in production atm.
Comment 3 Michael M. 2011-08-08 07:59:42 UTC
If you want to look into the error logs, I tried it when I created the account 4. Aug 2011 11:34 UTC (in als.wikipedia), just before my first report (in de.wikipedia) and again just now.
Comment 4 Mark A. Hershberger 2011-08-09 13:51:00 UTC
Note that I did some work on UserMailer.php — I'm not sure it would
have changed the behavior between trunk and 1.17, but it could have.
Did you test trunk, Brion?
Comment 5 Michael M. 2012-03-02 09:14:44 UTC
(In reply to comment #4)
> Note that I did some work on UserMailer.php — I'm not sure it would
> have changed the behavior between trunk and 1.17, but it could have.

No, that didn't fix the bug, I can still reproduce now with 1.19.
Comment 6 Céréales Killer 2012-09-12 07:28:37 UTC
Hi, I have received on OTRS a mail from an user complaining for this same error. He wants to reset his password and he gets allways this error (in French):

Erreur lors de l'envoi du courriel : Erreur inconnue dans la fonction mail() de PHP.

(Error sending the mail: Unknown error in PHP's mail() function.)

Ticket OTRS 2012090910012075 

User mail address: christophe.moustier@free.fr

Someone can check this issue?

Thanks!
Comment 7 Andre Klapper 2012-11-04 18:30:22 UTC
(In reply to comment #5)
> No, that didn't fix the bug, I can still reproduce now with 1.19.

http://www.mwusers.com/forums/showthread.php?18000-Error-sending-confirmation-Email states there was a fix in 1.18.1. 
However the error message is so generic that I can imagine many reasons why this fails (and that the two affected users who commented here might have different problems with the same outcome).

For the records, a similar report without a solution is https://jira.toolserver.org/browse/TS-1243
Comment 8 Michael M. 2013-10-23 07:16:01 UTC
This happened again on de.wikipedia, for a user with a @ in his name. After he was renamed (necessary for SUL anyway) he was able to verify his email address. As according to http://tools.ietf.org/html/rfc2045#page-19 it is perfectly fine to encode characters even when not needed, MediaWiki should just escape everything in the user name that could cause troubles, and only leave ASCII letters and numbers alone.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links