mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1412213 - Content-Type MIME-header - Skipping a parameter without an '='. r=mayhemer
This commit is contained in:
parent
a5927e6ebd
commit
a5c14a463b
@ -470,10 +470,12 @@ nsMIMEHeaderParamImpl::DoParameterInternal(const char *aHeaderValue,
|
||||
if (!*str) {
|
||||
break;
|
||||
}
|
||||
if (*str++ != '=') {
|
||||
if (*str != '=') {
|
||||
// don't accept parameters without "="
|
||||
goto increment_str;
|
||||
}
|
||||
// Skip over '=' only if it was actually there
|
||||
str++;
|
||||
while (nsCRT::IsAsciiSpace(*str)) ++str;
|
||||
|
||||
if (*str != '"') {
|
||||
|
@ -432,6 +432,14 @@ var tests = [
|
||||
// Bug 783502 - xpcshell test netwerk/test/unit/test_MIME_params.js fails on AddressSanitizer
|
||||
['attachment; filename="\\b\\a\\',
|
||||
"attachment", "ba\\"],
|
||||
|
||||
// Bug 1412213 - do continue to parse, behind an empty parameter
|
||||
['attachment; ; filename=foo',
|
||||
"attachment", "foo"],
|
||||
|
||||
// Bug 1412213 - do continue to parse, behind a parameter w/o =
|
||||
['attachment; badparameter; filename=foo',
|
||||
"attachment", "foo"],
|
||||
];
|
||||
|
||||
var rfc5987paramtests = [
|
||||
|
Loading…
Reference in New Issue
Block a user