[network] Improve checks while parsing MIME parameters.

This commit is contained in:
Moonchild 2023-04-12 16:41:04 +02:00 committed by roytam1
commit c9d9616334
4 changed files with 67 additions and 24 deletions

View file

@ -432,6 +432,16 @@ var tests = [
// Bug 783502 - xpcshell test netwerk/test/unit/test_MIME_params.js fails on AddressSanitizer
['attachment; filename="\\b\\a\\',
"attachment", "ba\\"],
// Bug 1784348
["attachment; filename=foo.exe\0.pdf",
Cr.NS_ERROR_ILLEGAL_VALUE,
Cr.NS_ERROR_INVALID_ARG],
["attachment; filename=\0\0foo\0",
Cr.NS_ERROR_ILLEGAL_VALUE,
Cr.NS_ERROR_INVALID_ARG],
["attachment; filename=foo\0\0\0", "attachment", "foo"],
["attachment; filename=\0\0\0", "attachment", ""],
];
var rfc5987paramtests = [