Skip to content

logging: fix multiple regexp filters on same field (fixes #7049) #7061

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

s2010
Copy link

@s2010 s2010 commented Jun 11, 2025

Solution

  • Added MultiRegexpFilter to handle multiple regex operations on same field
  • Enhanced FilterEncoder to automatically merge multiple regexp filters
  • Maintained full backward compatibility
  • Added security limits (max 50 operations, 1000 char patterns, 1MB input)

Changes

  • modules/logging/filters.go: Added MultiRegexpFilter with security validation
  • modules/logging/filterencoder.go: Enhanced parsing with automatic merging
  • modules/logging/filters_test.go: Added comprehensive tests
  • Added integration test

@CLAassistant
Copy link

CLAassistant commented Jun 11, 2025

CLA assistant check
All committers have signed the CLA.

@francislavoie
Copy link
Member

Nice, looks good! Don't forget to sign the CLA

@mholt
Copy link
Member

mholt commented Jun 13, 2025

I don't think I'm able to push to the branch, but if you sync up again the CI might pass.

s2010 added 2 commits June 14, 2025 14:22
…s - Fix MultiRegexpFilter input size limit test by ensuring output doesn't exceed max length after each operation - All tests now pass and linter issues resolved
…JSON output to use Unicode escape sequence for ampersand character - Integration tests now pass
@s2010
Copy link
Author

s2010 commented Jun 14, 2025

Hi @mholt I've resolved all the CI/CD pipeline issues that were preventing this PR from passing and synced up the branch.

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.

5 participants