-
Notifications
You must be signed in to change notification settings - Fork 291
Fix client_body_in_file_only config setting not respected #192
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
Conversation
Hi @martinhsv, any story behind this change? |
I mean, if #187 was the reason, then just the I'm not sure about another couple, as I barely remember there were some issues with connector tests. Happy to be wrong, but it's worth to check. |
Hi @defanator , The line:
cannot be left in place or the current issue will not be fixed. The nginx code that you have pointed to sets request_body_in_clean_file to 1 only if the configuration file has 'client_body_in_file_only clean;' If the config file has 'client_body_in_file_only on;' as in the poster's case, then the nginx code will set the variable request_body_in_clean_file=0 ... and then the ModSecurity connector code will effectively override that and always set it to 1. Everything I've seen suggests that the three line-deletes in this pull request should proceed, since those lines being present amount to arbitrarily override nginx's own configuration setup. (I did also note the code comments associated with those three lines ... the original coder obviously wasn't confident that they ought to be there.) Nevertheless, if there is a particular configuration+use case that you're worried won't work correctly with this pull request, feel free to let me know and I'll be happy to try it out. |
@martinhsv well, the proposed patch is breaking the following tests:
I did a quick check on past issues both in library and nginx connector to bring more context, but haven't found anything significant (I'll also check our internal KB/support cases when time permits). |
It seems like from all the following
only I think that removing another couple would resolve #187 and keep tests happy. Thoughts? PS: I've just checked that the
Once
|
Hi @defanator , Thanks for that. I'm a bit surprised by the result, but good to know. I'll alter/replace this pull request with one where the only change is to delete the single line 'r->request_body_in_clean_file = 1;' That's probably the safest thing to do for now since 1) That's the only change that I've identified as absolutely necessary to resolve the current issue and 2) You've already identified some side-effects to a broader change. |
Closing this in favour of pull request #194 |
No description provided.