Last modified: 2014-09-24 01:27:27 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 T20411, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18411 - The upload form only checks upload_max_filesize, not post_max_size
The upload form only checks upload_max_filesize, not post_max_size
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.15.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-09 02:39 UTC by Emufarmers
Modified: 2014-09-24 01:27 UTC (History)
4 users (show)

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


Attachments
A fix (1.96 KB, patch)
2009-04-09 04:02 UTC, Emufarmers
Details
A second fix (1.97 KB, patch)
2009-04-09 15:00 UTC, Stefano Codari
Details

Description Emufarmers 2009-04-09 02:39:08 UTC
The upload form only checks upload_max_filesize, not post_max_size; it should use the smaller of the two.
Comment 1 Emufarmers 2009-04-09 04:02:42 UTC
Created attachment 6009 [details]
A fix
Comment 2 Andrew Garrett 2009-04-09 04:03:55 UTC
Patch looks okay at a glance. I'd have to test it and switch branches to commit it, though.
Comment 3 Stefano Codari 2009-04-09 15:00:11 UTC
Created attachment 6010 [details]
A second fix

I've corrected the Patch by adding two trim functions before ini_get (line 26-27 of the patch), removing an useless parenthesis on line 29 and removing a double semicolon on line 39.
Comment 4 Siebrand Mazeland 2009-05-17 19:23:28 UTC
Applied in r50706. Thanks.
Comment 5 Brion Vibber 2011-04-04 20:43:04 UTC
This has regressed somewhere in the meantime; the current code in SpecialUpload.php only checks upload_max_filesize.
Comment 6 Brion Vibber 2011-04-04 20:45:49 UTC
Note that UploadFromFile::verifyUpload() does check both upload_max_filesize and post_max_size, but it doesn't seem to trigger properly -- I see no error message instead of seeing a verification failure error.

The limits output for the special page UI and the API should check both settings and return the minimum (actually the max file size would be a bit _smaller_ than the max post size, since a little space will be used for other form variables, but that's a start!)
Comment 7 Sumana Harihareswara 2011-11-10 02:46:45 UTC
Adding "reviewed" since Stefano's patch was reviewed and, indeed, committed.  cc'ing NeilK since he was recently talking/asking about size limits in uploading.

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


Navigation
Links