-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add Documentation for the Vertical Bar and the Semicolon #3331
Comments
Sorry to hijack this issue for another documentation issue, but I also noticed that for example |
Hi @thekief, thanks for reporting this, and I have to tell you I see your pain. Years ago when I started to explore ModSecurity, I was in same situation. Short: pipes ( The double colon is used to refer the key of a collection. For eg. If you have any idea how can we extend the documentation, please let us know. Or feel free to make a patch (you can clone the wiki from GH). |
Thank you for your fast answer,I really appreciate it. Like probably most people, I'm working off the OWASP CRS and sometimes I have to disable things. My biggest concern is that I accidentally do something that has some unintended side-effect or might miss maybe a really cool feature that cuts down my rule by half. To sum the answer so far:
And a few extra questions:
p.s. I will collect some feedback from colleagues and look into opening into a PR |
You're completely right. You (and anyone else) must be sure to avoid any unwanted side effect.
yes,
no, there is no such meaning. I mentioned
no, this is a wrong interpretation.
Consider a
In this case, the Please note that the
No.
Speaking of CRS, (if I'm not wrong) it handles this.
Just clarify: there is no "and" operation. So, there is no explicit "and" operation. You can make an "and" relation with
Uh, that's a good question. The problem is that there are two documentations, one for mod_security2 and another one for libmodsecurity3. Libmodsecurity3 based on mod_security2's, which is (probably) not up to date, therefore - I have a feeling - libmodsecurity3 documentation also has some leaks. But - unfortunately - we don't have enough capacity to maintain them. |
Thank you for the thorough answer. Two questions arose from your answer:
Sorry, that was some terrible phrasing from my side. Let's consider this example from the wiki:
The if this path matches, remove the rule for the argument Is that a correct interpretation?
I am a bit confused of this answer in the, e.g. the context of #2942. To my understanding when processing a body, |
yes. Even more clearly: consider the mentioned exclusion without part
In this case you completely remove the whole rule if the URI is
Ah, sorry - yes, you're right (but it wasn't visible in the context above). And now I can see this is a bit confusing. So, yes, if the content type is JSON, and the engine parses it as JSON, then the variables will be storing in {"root": {"level1": {"level2": {"a":1,"b":"foo"}}}} then the parser will fill the But if the request is an Hope this helps. |
To go back to my previous question in this regard: Is there some special handling for further data types, such as XML? |
@thekief sorry for the late answer.
I don't think so XML is a special target - or could you help me to clarify what do you mean "special handling"? |
I recently re-read the documentation and noticed that the vertical bar and the semicolon are used in a lot of examples without properly explaining their usage.
Please correct me, if I'm wrong but there seems no explicit documentation for these symbols in the wiki. In general it's really hard to find information, as most blogs just reference the official wiki. Especially for beginners it would be helpful to have an overview, what, e.g.
SecRule REQUEST_FILENAME|ARGS_NAMES|ARGS|XML:/* ...
does and why it is useful.The text was updated successfully, but these errors were encountered: