MantisBT: master 45771c63

Author Committer Branch Timestamp Parent
dhx dhx master 2010-01-05 03:13 master fce04e65
Affected Issues  0011326: Invalid form security token error displayed instead of file upload size too large error
Changeset

Fix 0011326: Don't show form security token error for oversized uploads

When a user attempts to upload a file that is too large (via
bug_file_add.php) the form POST values are not available to PHP.
Therefore the forum token security check will always fail first,
resulting in the wrong error message being shown to the user. Instead,
the check for blank POST form values should be performed first and a
"maximum file size exceeded" message shown to the user. If the file size
looks OK (from this initial check) then we can proceed to check the form
security token, knowing that any error message generated now will be
relevant.

mod - bug_file_add.php Diff File