-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add TRANSFER_ENCODING violation for MultiPart RFC7578 parser. #7976
Add TRANSFER_ENCODING violation for MultiPart RFC7578 parser. #7976
Conversation
Signed-off-by: Lachlan Roberts <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question about the scope of the violation, to eliminate harmless conditions leaving harmful ones to only trigger.
@@ -610,7 +637,8 @@ else if (key.equalsIgnoreCase("content-type")) | |||
|
|||
// Transfer encoding is not longer considers as it is deprecated as per | |||
// https://tools.ietf.org/html/rfc7578#section-4.7 | |||
|
|||
if (key.equalsIgnoreCase("content-transfer-encoding")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to be more subtle about this?
There are 3 Content-Transfer-Encoding
scenarios that are not a violation (as they basically mean nothing more than "identity" or "no encoding")
Content-Transfer-Encoding: 8bit
(common enough in older httpclients)Content-Transfer-Encoding: binary
(also common enough, Apache HttpClient will use this for example)Content-Transfer-Encoding: 7bit
(this one is iffy)
So that any other value is a violation
Signed-off-by: Lachlan Roberts <[email protected]>
* Add TRANSFER_ENCODING violation for MultiPart RFC7578 parser. * Ignore TRANSFER_ENCODING violation for 8bit and binary. Signed-off-by: Lachlan Roberts <[email protected]>
Add TRANSFER_ENCODING violation for MultiPart RFC7578 parser. (#7976)
see https://datatracker.ietf.org/doc/html/rfc7578#section-4.7