Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #11326: 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.
- Loading branch information