Opened 21 months ago

Last modified 21 months ago

#18474 new defect (bug)

Misleading error message when theme ZIP exceeds post_max_size

Reported by: ocean90 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Upload Version: 3.2
Severity: normal Keywords: has-patch dev-feedback
Cc: kpayne@…

Description

post_max_size is 32MB, now try to uploading a 40MB big ZIP.

You will get the Are you sure you want to do this? Please try again. message. But try again will not help.

Notice:
Warning: POST Content-Length of 47774864 bytes exceeds the limit of 33554432 bytes in Unknown on line 0

Attachments (1)

18474.diff (1006 bytes) - added by kurtpayne 21 months ago.
Patch to detect truncated POST requests

Download all attachments as: .zip

Change History (2)

Patch to detect truncated POST requests

  • Cc kpayne@… added
  • Component changed from Themes to Upload
  • Keywords has-patch dev-feedback added; needs-patch removed

This happens when php stops listening to the request after post_max_size is reached. When that happens, the mime request cannot be properly decoded, so no post variables come through (including the nonce).

18474.diff will detect the problem when a nonce fails and will give the proper error message, but there's nothing we can do about it from within WP.

Note: See TracTickets for help on using tickets.