Last modified: 2010-05-15 15:38:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 2446 - html entities replaced twice when displaying an e-mail error on userMailer()
html entities replaced twice when displaying an e-mail error on userMailer()
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
All All
: Lowest trivial with 1 vote (vote)
: ---
Assigned To: Dionysis Zindros
Depends on:
  Show dependency treegraph
Reported: 2005-06-18 17:32 UTC by Dionysis Zindros
Modified: 2010-05-15 15:38 UTC (History)
3 users (show)

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

Patch to fix the problem (13.03 KB, text/plain)
2005-06-18 17:35 UTC, Dionysis Zindros

Description Dionysis Zindros 2005-06-18 17:32:52 UTC
This bug occurs when the /includes/UserMailer.php::function userMailer() is
called. For instance from /includes/SpecialPreferences.php::class
PreferencesForm::function savePreferences() when changing the user e-mail
address and $wgEmailAuthentication is set to true, function
/includes/User.php::function sendConfirmationMail() calls
/includes/User.php::function sendMail(), which calls the userMailer() function.
If the server hasn't been set up for sending e-mails, an error will occur. The
error message displayed is something similar to the following:

Error sending mail: mail() [<a href='function.mail'>function.mail</a>]: Failed
to connect to mailserver at &quot;localhost&quot; port 25, verify your
&quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set()

Notice the &quot; entities, which should instead be displayed as double question
marks ("like this"). This shows that the message is passed to htmlspecialchars()
or htmlentities() twice (first in userMailer() and for a second time when the
page is rendered), causing this confusing output.
Comment 1 Dionysis Zindros 2005-06-18 17:35:27 UTC
Created attachment 616 [details]
Patch to fix the problem

I added a line on /includes/UserMailer.php, which is the following:

$wgErrorString = html_entity_decode( $wgErrorString );

before passing $wgErrorString to wfDebug(). This should fix the problem.
Comment 2 Aaron Schulz 2007-09-24 01:25:43 UTC
Please submit a patch, that is whole file :/
Comment 3 Marco 2008-11-08 15:16:22 UTC
Apparently, the offending stuff isn't even present any more, the output when mail() fails is static now (line 216).

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