-
Notifications
You must be signed in to change notification settings - Fork 1.7k
NGINX and SecRequestBodyAccess On option, don't pass POST request to Upstream Server #664
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
Comments
same whit modsecurity 2.7.5 |
From Modsecurity Serial Log (debug 9) i can see this :
It's normal that modsecurity forward back 569 bytes on " EOS container data type " ? |
OK.
there nginx.script http://bpaste.net/show/185689/ |
I'm having the same issue - mod_sec/NGINX doesn't properly forward validated POST requests to the upstream server, if SecRequestBodyAccess is enabled. I followed your suggestions and used your init script and compiled everything on a fresh machine, but still the same issue (500 error with POST requests when SecRequestBodyAccess is On). There are many bug reports regarding the very same issue, but still no solution. Any ideas? |
When I enable SPDY in Nginx, problems of Wordpress login fails with 503 has occurred. I think it's the same problem that is addressed here probably. It works fine if I disable SecRequestBodyAccess or SPDY. Error log contains the following is recorded in the front-end (excerpt). No errors are recorded in the back-end. [error] 14740 # 0: * 49 recv () failed (104: Connection reset by peer) while reading response header from upstream CentOS 6.5 64bit |
Hi @falsandtru, @infinitnet and @zotgene, there is a development branch of the nginx version where this issue should be fixed, can you guys test it? it is available at: |
Hi demofly, thanks for the input. Just to confirm, what you are saying is that in this new branch (https://github.com/SpiderLabs/ModSecurity/tree/nginx_refactoring), when you compile with "--disable-apache2-module" it stops to give you 500, but when you compiled it again without this option it starts to present problems again? In your first attempt, do you had a chance to perform it in a clean directory? Your it was the same directory that you already had performed a build before? If so, can you test in a clean directory? Thanks, |
So many people are waiting for your reply demofly :) Inviata da dispositivo mobile. Da: Felipe ZimmerleInviato: lunedì 26 maggio 2014 15:59A: SpiderLabs/ModSecurityRispondi a: SpiderLabs/ModSecurityCc: zotgeneOggetto: Re: [ModSecurity] NGINX and SecRequestBodyAccess On option, don't pass POST request to Upstream Server (#664)Hi demofly, thanks for the input. Just to confirm, what you are saying is that in this new branch (https://github.com/SpiderLabs/ModSecurity/tree/nginx_refactoring), when you compile with "--disable-apache2-module" it stops to give you 500, but when you compiled it again without this option it starts to present problems again? In your first attempt, do you had a chance to perform it in a clean directory? Your it was the same directory that you already had performed a build before? If so, can you test in a clean directory? Thanks, —Reply to this email directly or view it on GitHub. |
@zotgene: did you had a chance to give a test in this test branch ? |
Sorry guys, It is not confirmed. |
@demofly This specific issue, is fixed at branch nginx_refactoring ( https://github.com/SpiderLabs/ModSecurity/tree/nginx_refactoring ) Please test and report your findings. |
@zimmerle , I've built nginx 1.4.6 with the branch you have provided with no effect. It works in the same manner as the master branch: ==> /var/log/nginx/my.site.com-error.log <== ==> /var/log/nginx/my.site.com-access.log <== P.S. I should note the issue triggers for Android clients only (the same with the code from the master branch). |
I've test nginx_refactoring branch, this issue seems be fixed, thank you Felipe Zimmerle. |
I didn't test it properly, I only tested GET requests. POST requests still result in "no upstream configuration" errors. |
Still same issue with modesc 2.8, nginx 1.6 |
@elialum check out #582 - kyprizel pushed a patch that you can find there and according to another user that fixes the problem. I'm just waiting for the main devs to push it to the nginx_refactoring branch to test it from there. PS: Looks like @kyprizel 's patch doesn't work for me, still the same errors. I updated #582 regarding this. |
Is there intent to address this issue? If so, any idea on ETA? |
It would be fantastic if this issue was resolved in mainstream. I just setup nginx with mod_security and while I'm loving how well it works (after a bit of tuning with the OWASP rules), it would be nice if I could have both the ability to do POST requests and the ability to have modsec to work on them. |
Hi @zimmerle @csanders-git, the issue Deny all the POST request #813 have been closed ,but I have installed the modsecurity-2.9.0-RC1 in the Nginx server, the issue is still appearing, after i set the SecRequestBodyAccess to Off, the problem not appear. |
Hi @zimmerle, |
Hi @wangxianwei for those nginx modifications please use the branch nginx_refactoring, available here: https://github.com/SpiderLabs/ModSecurity/tree/nginx_refactoring The modification of the branch nginx_refactoring will be merge into mainline and released once we mitigate all the issues listed here. |
Hi @zimmerle, I have download the version from the branch nginx_refactoring, but i dont know how to compile it, because there is no configure file . can you please give me the complete installation package. |
Hi @wangxianwei, that is a development version. The configure is generated after the execution of the ./autogen.sh |
Hi @zimmerle, I have installed the version from the branch nginx_refactoring,but the issue is not resolved. please see the folliowing information. wwwlogs Error Nginx Data --1ff89643-C-- --1ff89643-E-- ^M <title>500 Internal Server Error</title>^M ^M500 Internal Server Error^Mnginx^M ^M ^M --1ff89643-H-- --1ff89643-K-- --1ff89643-Z-- the error log of the modsecurity: |
Hi @zimmerle, Regards, |
I think that if we use a redirect the problem go away. Someone can try? Inviata da dispositivo mobile. Da: wangxianweiInviato: giovedì 22 gennaio 2015 14:39A: SpiderLabs/ModSecurityRispondi a: SpiderLabs/ModSecurityCc: zotgeneOggetto: Re: [ModSecurity] NGINX and SecRequestBodyAccess On option, don't pass POST request to Upstream Server (#664)Hi @zimmerle, Regards, —Reply to this email directly or view it on GitHub. |
On Thu, Jan 22, 2015 at 5:11 PM, zotgene [email protected] wrote:
Donatas |
Hello, any news? |
Hello, |
The `nginx_refactoring' branch in fact contains a lot of fixes, however, some of those fixes may be a problem depending on your environment. We are studying this possibility to release it. Most likely the next stable release for nginx will be the version 3.0 with the ModSecurity nginx connector: https://github.com/SpiderLabs/ModSecurity-nginx We don't have a release date yet. |
Example of error: My system: root@waf:/usr/local/nginx/logs# nginx -v Version of ModSecurity installed: cd /usr/src/ |
Please use the ModSecurity-nginx connector: |
Marking as won't fix in 2.x. It is no longer a concern in libModSecurity: https://github.com/SpiderLabs/ModSecurity/tree/v3/master |
On Debian 7.3 64bit, same issue whit nginx 1.4.4 and 1.5.1, ModSecurity is 2.7.7 . Have try whitout rules, whitout SSL and have recompiling many times Nginx and ModSecurity whit different configure option, same issue : if on modsecurity.conf SecRequestBodyAccess is set on On, nothing arrive on upstream Server ( Wireshark checked ) .
nginx debug log : http://bpaste.net/show/EZwvs4TsjkA64abviKMW/
The text was updated successfully, but these errors were encountered: