caddy
caddy copied to clipboard
logging: fix multiple regexp filters on same field (fixes #7049)
Solution
- Added
MultiRegexpFilterto handle multiple regex operations on same field - Enhanced
FilterEncoderto 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: AddedMultiRegexpFilterwith security validationmodules/logging/filterencoder.go: Enhanced parsing with automatic mergingmodules/logging/filters_test.go: Added comprehensive tests- Added integration test
Nice, looks good! Don't forget to sign the CLA
I don't think I'm able to push to the branch, but if you sync up again the CI might pass.
Hi @mholt I've resolved all the CI/CD pipeline issues that were preventing this PR from passing and synced up the branch.