Fixed: ngx_http_read_client_request_body returned unexpected buffer type - #22
Merged
brenosilva merged 6 commits intoJan 4, 2013
Merged
brenosilva merged 6 commits into
brenosilva merged 6 commits into
Conversation
- after post request is processed the calling to ngx_http_read_client_request_body will ingore r->request_body_in_file_only option, which is not expected.
|
Nice catch, but looks like there is a problem with modsecurity_read_body_cb. nginx: client_max_body_size 10m; ModSecurity: SecRequestBodyLimit 10048576; Upload 5Mb file and always get the same error: 2013/01/04 00:55:16 [info] 27981#0: [client 127.0.0.1] ModSecurity: Request body is larger than the configured limit (10048576).. Deny with code (413) [hostname "standalone"] [uri "/test_post.php"] [unique_id "12345"] |
Contributor
Author
|
Fixed 'Request body is larger‘ error. |
brenosilva
added a commit
that referenced
this pull request
Jan 4, 2013
Fixed: ngx_http_read_client_request_body returned unexpected buffer type
Contributor
|
Applied. Thanks! |
Contributor
|
Hello Sirs, When applied this patch and run ab -n 1000 -c 1 "http://192.168.0.110/index.html" , i'm seeing a lot of seg faults in error.log. Could you take a look ? |
Contributor
|
I'm going to build a new VM and redo my tests. My current VM is not 100%. Let's see |
Contributor
|
I can confirm the issues in a fresh VM. |
Contributor
|
OK. the bug (ab related one ) disappeared when disable SecAuditEngine... should be related to https://www.modsecurity.org/tracker/browse/MODSEC-374 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
after request body phase, POSTed request body is saved in memory buffer chain and request_body_in_file_only option is ignored, so if other module set request_body_in_file_only on and call ngx_http_read_client_request_body after modsecurity handler, the module will receive unexpected buffer. for example http_dav_handler for PUT request.