1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

- Fixed bug #53180 (post_max_size=0 not disabling the limit when the content

type is application/x-www-form-urlencoded or is not registered with PHP).
This commit is contained in:
Gustavo André dos Santos Lopes
2010-10-27 14:56:51 +00:00
parent b5b4f94a4c
commit ee80871a15
3 changed files with 24 additions and 2 deletions
+3
View File
@@ -44,6 +44,9 @@
- Fixed ReflectionProperty::isDefault() giving a wrong result for properties
obtained with ReflectionClass::getProperties(). (Gustavo)
- Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
type is application/x-www-form-urlencoded or is not registered with PHP).
(gm at tlink dot de, Gustavo)
- Fixed bug #53144 (Segfault in SplObjectStorage::removeAll()). (Felipe)
- Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). (Gustavo)
- Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the
+2 -2
View File
@@ -194,7 +194,7 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
int read_bytes;
int allocated_bytes=SAPI_POST_BLOCK_SIZE+1;
if (SG(request_info).content_length > SG(post_max_size)) {
if ((SG(post_max_size) > 0) && (SG(request_info).content_length > SG(post_max_size))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes",
SG(request_info).content_length, SG(post_max_size));
return;
@@ -207,7 +207,7 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
break;
}
SG(read_post_bytes) += read_bytes;
if (SG(read_post_bytes) > SG(post_max_size)) {
if ((SG(post_max_size) > 0) && (SG(read_post_bytes) > SG(post_max_size))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds %ld bytes", SG(post_max_size));
break;
}
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #53180 (post_max_size=0 partly not working)
--INI--
post_max_size=0
--POST--
email=foo&password=bar&submit=Log+on
--FILE--
<?php
var_dump($_POST);
?>
--EXPECT--
array(3) {
["email"]=>
string(3) "foo"
["password"]=>
string(3) "bar"
["submit"]=>
string(6) "Log on"
}