зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1412213 - Content-Type MIME-header - Skipping a parameter without an '='. r=mayhemer
This commit is contained in:
Родитель
a5927e6ebd
Коммит
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 = [
|
||||
|
|
Загрузка…
Ссылка в новой задаче