Skip to content

Fix GH-14695: Strictly validate invalid upload_max_filesize and post_max_size values#22489

Draft
LamentXU123 wants to merge 3 commits into
php:masterfrom
LamentXU123:gh14695-copy-998bce0f
Draft

Fix GH-14695: Strictly validate invalid upload_max_filesize and post_max_size values#22489
LamentXU123 wants to merge 3 commits into
php:masterfrom
LamentXU123:gh14695-copy-998bce0f

Conversation

@LamentXU123

Copy link
Copy Markdown
Member

This PR adds strict quantity validation for upload_max_filesize and post_max_size.

For ini settings, Invalid values now emit a warning and keep the existing effective value instead of being coerced by backwards-compatible parsing. So upload_max_filesize=1zz is now parsed as default value 2M instead of 1 with the warning emitted.

And for the request_parse_body() originally we emit warning and parse those malformed input but now we are throwing ValueErrors to stuff like upload_max_filesize : ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant