Skip to content

Multipart names may include single quote if double-quote enclosed #2661

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

Merged
merged 1 commit into from
Dec 23, 2021
Merged

Conversation

martinhsv
Copy link
Contributor

This pull request reduces the set of use cases that result in 'Invalid Quoting' being flagged during multipart parsing of the Content-Disposition's 'name' or 'filename'.

The following will no longer result in 'Invalid Quoting':

name="ab'cd"

The following will continue to result in 'Invalid Quoting':

name='abcd'
name=ab'cd

This change matches recent updates done in v2, see that pull request for more detail:
#2660

@binhjy
Copy link

binhjy commented Jan 7, 2022

Hi @martinhsv , this fix will be on which release? Thanks

@martinhsv
Copy link
Contributor Author

It will be included automatically in the next official release in each of v2.9.x and v3.0.x. But it is available immediately for anyone who clones from github and builds ModSecurity themselves.

@martinhsv martinhsv added the 3.x Related to ModSecurity version 3.x label Jan 10, 2022
@binhjy
Copy link

binhjy commented Jan 13, 2022

Hi @martinhsv , can you double check also with this rule SecRule FILES_NAMES|FILES: https://github.com/coreruleset/coreruleset/blob/v3.0.2/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf#L100 (pls change the branch)? Will the name="ab'cd" passes this rule?

@martinhsv
Copy link
Contributor Author

Hello @binhjy ,

The coreruleset is managed by a separate group. If you have questions about the specific behaviour of individual rules, you should contact them directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Related to ModSecurity version 3.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants