Skip to content
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

Tag not working with macro expansion #1118

Open
fzipi opened this issue Jul 30, 2024 Discussed in #1117 · 1 comment
Open

Tag not working with macro expansion #1118

fzipi opened this issue Jul 30, 2024 Discussed in #1117 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@fzipi
Copy link
Member

fzipi commented Jul 30, 2024

Discussed in #1117

Originally posted by fardin01 July 30, 2024
According to tag action documentation, tag action supports Macro Expansions. However, it does not seem to work.

tag:'request-id:%{REQUEST_HEADERS.X-Request-ID}' produces [tag \"request-id:%{REQUEST_HEADERS.X-Request-ID}\"] in the log. I have also tried:

SecRule REQUEST_HEADERS:x-request-id ".*" "id:900001,phase:1,pass,nolog,setvar:tx.x-request-id=%{MATCHED_VAR}"

tag:'request-id:%{tx.x-request-id}',\

which produces [tag \"request-id:%{tx.x-request-id}\"]. How do I make this work?

@fzipi fzipi self-assigned this Jul 30, 2024
@fzipi fzipi added the bug Something isn't working label Jul 30, 2024
@fzipi
Copy link
Member Author

fzipi commented Aug 1, 2024

Took a look at this code. It will need a big refactor, as the tags are just strings for now. Probably because of performance reasons. But in the end we should:

  • correct the documentation that says we support it.
  • prioritize the implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant