Skip to content

Remove deprecated REQBODY_PROCESSOR_ERROR and REQBODY_PROCESSOR_ERROR_MSG - #3578

Merged
airween merged 4 commits into
owasp-modsecurity:v2/masterfrom
hnakamur:v2/remove_deprecated_reqbody_processor_error
Jul 2, 2026
Merged

airween merged 4 commits into
owasp-modsecurity:v2/masterfrom
hnakamur:v2/remove_deprecated_reqbody_processor_error

Conversation

@hnakamur

Copy link
Copy Markdown
Contributor

what

  • Rename variable generator functions to match the new variable names.
  • Remove remaining references to the deprecated variables and update tests to use the new ones.

why

The REQBODY_PROCESSOR_ERROR and REQBODY_PROCESSOR_ERROR_MSG variables were deprecated, and the new REQBODY_ERROR and REQBODY_ERROR_MSG variables were introduced in: d0e2546

REQBODY_ERROR always has the same value as REQBODY_PROCESSOR_ERROR because both use the same variable generator function. The same is true for REQBODY_ERROR_MSG and REQBODY_PROCESSOR_ERROR_MSG.

In addition, there are no remaining references to the deprecated REQBODY_PROCESSOR_ERROR or REQBODY_PROCESSOR_ERROR_MSG variables in: https://github.com/coreruleset/coreruleset

See #3576 for the discussion.

references

…_MSG

* Rename variable generator functions to match the new variable names.
* Remove remaining references to the deprecated variables and update tests to use the new ones.

Why this change?

The REQBODY_PROCESSOR_ERROR and REQBODY_PROCESSOR_ERROR_MSG variables were deprecated, and the
new REQBODY_ERROR and REQBODY_ERROR_MSG variables were introduced in:
owasp-modsecurity@d0e2546

REQBODY_ERROR always has the same value as REQBODY_PROCESSOR_ERROR because both use the same
variable generator function. The same is true for REQBODY_ERROR_MSG and REQBODY_PROCESSOR_ERROR_MSG.

In addition, there are no remaining references to the deprecated REQBODY_PROCESSOR_ERROR or
REQBODY_PROCESSOR_ERROR_MSG variables in: https://github.com/coreruleset/coreruleset

See owasp-modsecurity#3576 for the discussion.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the deprecated REQBODY_PROCESSOR_ERROR / REQBODY_PROCESSOR_ERROR_MSG variables from the default variable registry and updates bundled configs + regression tests to use the newer REQBODY_ERROR / REQBODY_ERROR_MSG equivalents.

Changes:

  • Removed registration of deprecated request-body error variables and renamed the associated generator functions to match the non-deprecated variable names.
  • Updated regression tests to reference REQBODY_ERROR instead of REQBODY_PROCESSOR_ERROR.
  • Updated sample configuration files to log REQBODY_ERROR in multipart strict-validation messages.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/regression/target/00-targets.t Removes TODO entries for deprecated variables.
tests/regression/misc/00-multipart-parser.t Replaces deprecated variable usage in multipart regression rules.
tests/modsecurity.conf-minimal Updates multipart strict-validation log message to use REQBODY_ERROR.
modsecurity.conf-recommended Updates multipart strict-validation log message to use REQBODY_ERROR.
iis/wix/modsecurity.conf Updates multipart strict-validation log message to use REQBODY_ERROR.
apache2/re_variables.c Removes deprecated variable registration and renames generator functions for the new variable names.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hnakamur

hnakamur commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

invert the operator and drop chain

I had forgotten to invert the operator. This has been fixed in commit 63798f0.

@airween

airween commented Jul 2, 2026

Copy link
Copy Markdown
Member

@hnakamur could you update your branch from v2/master?

@hnakamur

hnakamur commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged v2/master in commit c1edef2

@airween
airween merged commit df082e7 into owasp-modsecurity:v2/master Jul 2, 2026
92 checks passed
@airween

airween commented Jul 2, 2026

Copy link
Copy Markdown
Member

Thanks, @hnakamur!

@hnakamur

hnakamur commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Thank you!

@hnakamur
hnakamur deleted the v2/remove_deprecated_reqbody_processor_error branch July 2, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.x Related to ModSecurity version 2.x

3 participants