-
-
Notifications
You must be signed in to change notification settings - Fork 767
Closed
Labels
4b Major-reworkThese issues need to be part of a full chapter reworkThese issues need to be part of a full chapter rework6) PR awaiting reviewV5 (prev V12)_5.0 - prepThis needs to be addressed to prepare 5.0This needs to be addressed to prepare 5.0
Description
Basically, it must follow RFC 6266: "Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)"
https://tools.ietf.org/html/rfc6266#section-5
Proposal (2023-04-29 updated requirement text and added alternative category):
- Category: V12.5 "File and Resources > File Download" OR "V5.3 Output Encoding and Injection Prevention"
- Verify that when Content-Disposition header is used then filename and filename* attribute values are correctly sanitized and encoded.
- Level: 1, 2, 3
- CWE: ?
- CWE-172 - CWE-172: Encoding Error
Note: Content-Disposition
header may be used with attachment or inline, so we can not limit requirement text only for "download file" functionality.
Why: if not converted correctly, it may give "header injection" possibility
Something like that (even this one is for mails):
Update:
filename
- only characters from ISO-8859-1 can be used, value bust be sanitizedfilename*
- can be presented in chosen charset (utf-8) and need to be: sanitized + encoded to charset + urlencoded
danielcuthbert, motoyasu-saburi and Sjord
Metadata
Metadata
Labels
4b Major-reworkThese issues need to be part of a full chapter reworkThese issues need to be part of a full chapter rework6) PR awaiting reviewV5 (prev V12)_5.0 - prepThis needs to be addressed to prepare 5.0This needs to be addressed to prepare 5.0