Skip to content

fix: update target rules #34

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

Merged
merged 10 commits into from
Jun 15, 2025

Conversation

Agustindeleon
Copy link
Contributor

what

  • add parser events to support tags and messages enclosed in quotes.
  • add support to replaced targets as stated in the Reference Manual
  • separate events for each update target rule type

why

  • quoted strings break the parser in update target rules
  • the parser didn't support explicitly replacing targets, it only supported append target use cases
  • separate events enable listener to handle each rule type differently

Copy link
Member

@fzipi fzipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use updated instead or remplaced? I don't think that one exists? Maybe even new?

@Agustindeleon
Copy link
Contributor Author

Uh, you're right. Now that you've pointed it out, it's really confusing, because the variable being replaced is actually the other one, e.g., in !REQUEST_FILENAME|REQUEST_URI, the replaced var is REQUEST_FILENAME.
updated confuses me too, I think new_target is a better option.

@Agustindeleon Agustindeleon requested a review from fzipi June 14, 2025 20:52
@fzipi fzipi merged commit c515844 into coreruleset:main Jun 15, 2025
1 check passed
@fzipi fzipi deleted the fix/StringUpdateRules branch June 15, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants