Skip to content
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

move Content-Encoding check to configurable tx.restricted_headers #2782

Merged
merged 1 commit into from Sep 14, 2022

Conversation

lifeforms
Copy link
Member

@lifeforms lifeforms commented Sep 14, 2022

As in #2780, this PR moves the Content-Encoding header check to tx.restricted_headers for consistency.

Tested locally that it still blocks the header:

Message: Warning. String match within "/accept-charset/ /content-encoding/ /proxy/ /lock-token/ /content-range/ /if/" at TX:header_name_content-encoding. [file "/etc/modsecurity.d/owasp-crs/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "1156"] [id "920450"] [msg "HTTP header is restricted by policy (/content-encoding/)"] [data "Restricted header detected: /content-encoding/"] [severity "CRITICAL"] [ver "OWASP_CRS/4.0.0-rc1"] [tag "modsecurity"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "paranoia-level/1"] [tag "OWASP_CRS"] [tag "capec/1000/210/272"] [tag "PCI/12.1"]

@dune73
Copy link
Member

dune73 commented Sep 14, 2022

Visual review looks good to me. Also checked the wording of the comment. Well done.

@lifeforms lifeforms merged commit bc23f17 into coreruleset:v4.0/dev Sep 14, 2022
@lifeforms lifeforms mentioned this pull request Sep 14, 2022
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.

None yet

2 participants