-
Notifications
You must be signed in to change notification settings - Fork 732
Capture tidy up #1107
Capture tidy up #1107
Conversation
| "id:941100,\ | ||
| phase:2,\ | ||
| block,\ | ||
| capture,\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure if this is needed or we can replace %{tx.0} with %{matched_var} in setvar:'tx.%{rule.id}-OWASP_CRS/WEB_ATTACK/XSS-%{matched_var_name}=%{tx.0}'"
|
The comment above needs to be tested. @fgsch said that these are mixed throughout but currently there is no harm merging the current content without that. |
|
Leaving this open so someone can test it to make sure it works. |
|
Responding here to the review question of @fgsch: Surprisingly, you have to use Here is what the debug log says on apache / modsec 2.9.2:
I tried to find out where it got the content-type from, but I could not. I also tested with nginx / modsec 3.0.2. There, both variants work. Please change to |
|
@dune73 thanks. I will remove the capture and use Related to this, I can see many rules using tx.0 in the same context, which is a bit surprising. |
|
I've removed the capture but kept the We can address the use of |
|
Yes, I was puzzled by this relevation too. Actually I wonder if we need this construct at all. It's in so many rules and all I see is eaten ressources. Also plays into reorganizing 980xxx. |
|
Ready to merge? |
|
It is from my POV. |
|
A merge it is then. Thank you for the PR. And please keep this |
Add or remove capture as appropriate.