Last modified: 2013-07-30 00:10:57 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 T12668, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10668 - Detect and notify user of extremely low (probably accidental) POST limits
Detect and notify user of extremely low (probably accidental) POST limits
Status: NEW
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-23 15:14 UTC by Josh Boyd
Modified: 2013-07-30 00:10 UTC (History)
2 users (show)

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


Attachments

Description Josh Boyd 2007-07-23 15:14:59 UTC
System Stats:

Ubuntu 6.06 LTS (fresh install)
MySQL 5.0.24a-Debian_9ubuntu2-log
PHP 5.1.6
Apache 2.0.55
MediaWiki 1.10.1

MediaWiki worked fine for about a week, after a week's time user's are no longer able to login, including WikiSysop.  No changes occured on the server in terms of configuration in this time. Also had the same problem on another machine running Fedora Core 1 last week, prompting a new server and new OS install. Error message occurs when trying to login or create a new user.

Login error:
You have not specified a valid user name.

I have tried editing isValidUserName in User.php to always return true however the error still occurs.  Attempted to reset passwords for users in the database using supplied changePassword.php, however error still occurs.  Also attempted creating a new admin via createAndPromote.php, with the same problem occuring.
Comment 1 Josh Boyd 2007-07-23 17:04:34 UTC
Modifying php.ini to decrease max_post_size, memory_size, etc to php.ini-dist settings fixed this issue.
Comment 2 Brion Vibber 2007-07-23 17:15:22 UTC
As per IRC disussion; most likely cause was an invalid value for post_max_size or memory_limit setting in php.ini:

http://www.php.net/manual/en/ini.core.php#ini.post-max-size

Unfortunately the exact lines in Josh's broken php.ini are no longer available for testing, but this example reproduces the described error:

post_max_size = 1GB

K, M, and G are valid suffixes for shorthand, but KB, MB, and GB are not:
http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes

A size specified with 'MB' or 'GB' gets interpreted just in bytes -- 1 byte for 1GB, 1024 bytes for 1024MB, etc. The result can be a much lower limit than intended, which might be hitting the limits on certain or all form submissions.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-23 18:28:23 UTC
Let's fix that then, shall we?
Comment 4 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-24 18:46:24 UTC
Probably best not to make this only on installation, Rob: the original bug reported issues after the values were changed in production.  Since this issue would break essentially every page that's not just a simple article (or some special pages) being viewed, we could consider putting it somewhere in OutputPage as a general check that would print a nasty warning on every page with maybe a couple of special exceptions (e.g., plain article view).

What value would be good to test for?  It seems unlikely that nowadays you'd have any legitimate reason to set POST lower than 1M, but 10K wouldn't break anything if you want to use short articles and no uploads, I think.  Plus, it's unlikely that someone will enter anything above 10K in the manner described above: 10240KB would be a fairly bizarre thing to type (why not 10M?).  I'd err on the side of caution in displaying the message.  If it's, say, 5K or 10K before the message appears, and your limit is set to 11K, the problem will only occur when submitting longish pages, which should be easier to troubleshoot in the odd case it does occur.
Comment 5 Jarry1250 2011-03-08 17:13:18 UTC
Four years on, maybe this would be best as a test in the new installer? Just a thought. Assuming it's not been fixed already in some way, of course.

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


Navigation
Links