Last modified: 2006-10-04 12:15:30 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 T9004, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7004 - PHP iconv() notice on bad password input to Special:Userlogin, with E_ALL enabled.
PHP iconv() notice on bad password input to Special:Userlogin, with E_ALL ena...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.8.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-14 01:33 UTC by Nick Jenkins
Modified: 2006-10-04 12:15 UTC (History)
0 users

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


Attachments
Patch to iconv call to convert illegal password chars to nearest legal ones (738 bytes, patch)
2006-08-14 01:36 UTC, Nick Jenkins
Details

Description Nick Jenkins 2006-08-14 01:33:55 UTC
Test:
-----------------------------------------------
curl --silent --include \
 --cookie 'wikidb_session=1'\
 -F 'wpName'='nickj'\
 -F 'wpPassword'='^G'\
 'localhost/wiki/index.php?title=Special:Userlogin&action=submitlogin'
-----------------------------------------------

Note: "^G" is the ASCII Bell control character (
http://en.wikipedia.org/wiki/Bell_character ), not the string "^" + "G". Also
"nickj" is a valid user name on the test wiki.

Output contains this, on a wiki with error_reporting(E_ALL) :
-----------------------------------------------
<b>Notice</b>:  iconv() [<a href='function.iconv'>function.iconv</a>]: Detected
an illegal character in input string in
<b>/var/www/hosts/mediawiki/phase3/includes/User.php</b> on line <b>1798</b><br />
-----------------------------------------------

One-line patch will be attached shortly.
Comment 1 Nick Jenkins 2006-08-14 01:36:41 UTC
Created attachment 2223 [details]
Patch to iconv call to convert illegal password chars to nearest legal ones

Note for some reason the iconv() "//IGNORE" parameter listed on
http://php.net/manual/en/function.iconv.php doesn't stop the error, but
"//TRANSLIT" does.
Comment 2 Nick Jenkins 2006-10-04 12:06:52 UTC
A better test for reproducing this:
-----------------------------
echo -e -n '\a' > file.txt
curl --silent --include --globoff \
 --cookie 'wikidb_session=1' \
 -F 'wpName'='nickj' \
 -F 'wpPassword'='<file.txt' \
 -F 'wpRemember'='1' \
 'localhost/wiki/index.php?title=Special:Userlogin&action=submitlogin&type=login&returnto=&#124;'
| grep iconv
-----------------------------

Note requires error_reporting(E_ALL);
Comment 3 Nick Jenkins 2006-10-04 12:15:30 UTC
Fixed in r16794.

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


Navigation
Links