зеркало из https://github.com/mozilla/pjs.git
Bug 367428 - sanity-check resource URIs, r=biesi
This commit is contained in:
Родитель
3d45ac5c68
Коммит
021d7ba460
|
@ -331,7 +331,8 @@ nsResProtocolHandler::ResolveURI(nsIURI *uri, nsACString &result)
|
|||
url->GetFilePath(filepath);
|
||||
|
||||
// Don't misinterpret the filepath as an absolute URI.
|
||||
if (filepath.FindChar(':') != -1)
|
||||
if (filepath.FindChar(':') != -1 ||
|
||||
filepath.FindChar('\\') != -1)
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
|
||||
const char *p = path.get() + 1; // path always starts with a slash
|
||||
|
|
|
@ -9,6 +9,8 @@ const specs = [
|
|||
"resource:////",
|
||||
"resource:///http://www.mozilla.org/",
|
||||
"resource:///file:///",
|
||||
"resource:///..\\",
|
||||
"resource:///..\\..\\",
|
||||
];
|
||||
|
||||
function check_for_exception(spec)
|
||||
|
|
Загрузка…
Ссылка в новой задаче