Skip to content

Conversation

@trgalho
Copy link
Contributor

@trgalho trgalho commented May 23, 2025

Thank you for contributing to Coraza WAF, your effort is greatly appreciated
Before submitting check if what you want to add to coraza list meets quality standards before sending pull request. Thanks!

This PR addresses an issue in the corazawaf cutQuotedString function where the presence of backslashes (\\) in the operator value prevents proper parsing of the SecRule. This parsing failure leads to load configuration errors and does not allow users to write certain rules for corazawaf, resulting in potential misconfigurations.

Make sure that you've checked the boxes below before you submit PR:

Thanks for your contribution ❤️

@trgalho trgalho requested a review from a team as a code owner May 23, 2025 18:15
@trgalho trgalho changed the title fix: cutQuotedString not working when \\ is present Fix: resolve cutQuotedString issue with double backslashes (\\) present May 23, 2025
@trgalho trgalho changed the title Fix: resolve cutQuotedString issue with double backslashes (\\) present Fix: resolve cutQuotedString issue with double backslashes (\\) May 23, 2025
@trgalho trgalho changed the title Fix: resolve cutQuotedString issue with double backslashes (\\) fix: resolve cutQuotedString issue with double backslashes (\\) May 23, 2025
@codecov
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.37%. Comparing base (4141903) to head (f11941e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1364      +/-   ##
==========================================
+ Coverage   84.36%   84.37%   +0.01%     
==========================================
  Files         170      170              
  Lines        9925     9933       +8     
==========================================
+ Hits         8373     8381       +8     
  Misses       1308     1308              
  Partials      244      244              
Flag Coverage Δ
coraza.rule.case_sensitive_args_keys 84.33% <100.00%> (+0.01%) ⬆️
coraza.rule.multiphase_evaluation 84.03% <100.00%> (+0.01%) ⬆️
coraza.rule.no_regex_multiline 84.31% <100.00%> (+0.01%) ⬆️
default 84.37% <100.00%> (+0.01%) ⬆️
examples+ 16.33% <55.55%> (+0.04%) ⬆️
examples+coraza.rule.case_sensitive_args_keys 84.33% <100.00%> (+0.01%) ⬆️
examples+coraza.rule.multiphase_evaluation 83.87% <100.00%> (+0.01%) ⬆️
examples+coraza.rule.no_regex_multiline 84.23% <100.00%> (+0.01%) ⬆️
examples+memoize_builders 84.34% <100.00%> (+0.01%) ⬆️
examples+no_fs_access ?
ftw 84.37% <100.00%> (+0.01%) ⬆️
memoize_builders 84.47% <100.00%> (+0.01%) ⬆️
no_fs_access 83.87% <100.00%> (+0.01%) ⬆️
tinygo 84.34% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

nit: update variable name.

Other than that, LGTM.

Apply suggestions from code review

Co-authored-by: Felipe Zipitría <3012076+fzipi@users.noreply.github.com>
@fzipi fzipi merged commit 04c2209 into corazawaf:main Jun 17, 2025
70 of 72 checks passed
@trgalho trgalho deleted the trgalho-fix branch June 18, 2025 12:40
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