-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fixed: ngx_http_read_client_request_body returned unexpected buffer type #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed: ngx_http_read_client_request_body returned unexpected buffer type #22
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"] |
Fixed 'Request body is larger‘ error. |
Fixed: ngx_http_read_client_request_body returned unexpected buffer type
Applied. Thanks! |
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 ? |
I'm going to build a new VM and redo my tests. My current VM is not 100%. Let's see |
I can confirm the issues in a fresh VM. |
OK. the bug (ab related one ) disappeared when disable SecAuditEngine... should be related to https://www.modsecurity.org/tracker/browse/MODSEC-374 |
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.