diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-10-27 14:56:51 +0000 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-10-27 14:56:51 +0000 |
commit | ee80871a1577afbc22454084fb8fa284d20a6cd4 (patch) | |
tree | 3333f2fea7aa84054616c5450230f4fd04871ebb /main/SAPI.c | |
parent | b5b4f94a4cc3fbe9ce5200a8719826a12926d5fe (diff) | |
download | php-git-ee80871a1577afbc22454084fb8fa284d20a6cd4.tar.gz |
- 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).
Diffstat (limited to 'main/SAPI.c')
-rw-r--r-- | main/SAPI.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 8593cd7d27..4a1605b0c5 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -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; } |