Fix case-insensitive request header target exclusions - #3616
Fix case-insensitive request header target exclusions#3616TejasButani001 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change makes non-regex variable target matching case-insensitive. A regression test verifies that lowercase ChangesCase-Insensitive Target Matching
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR makes a localized case-insensitivity correction with accompanying regression coverage, and no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Hi @TejasButani001, thanks for this PR - will this close #3609? |



Summary
Fix case-sensitive matching of REQUEST_HEADERS target exclusions.
Previously, an exclusion such as:
SecRuleUpdateTargetById 1 !REQUEST_HEADERS:referer
could fail to exclude the corresponding request header when the header name
used a different case.
This change makes REQUEST_HEADERS target exclusion matching case-insensitive.
Testing
Added a regression test covering case-insensitive REQUEST_HEADERS exclusion.