зеркало из https://github.com/mozilla/gecko-dev.git
Bug 451958. Add more CheckLoadURIs (part 3). r+sr=roc
--HG-- extra : rebase_source : e4fbaea74fa01592896982d4c3862fa8a0ad86dd
This commit is contained in:
Родитель
57d9b95389
Коммит
ec9d34ccb2
|
@ -286,6 +286,17 @@ nsresult nsFileStreamStrategy::Open(nsIStreamListener** aStreamListener)
|
|||
|
||||
rv = NS_NewLocalFileInputStream(getter_AddRefs(mInput), file);
|
||||
} else {
|
||||
// Ensure that we never load a local file from some page on a
|
||||
// web server.
|
||||
nsHTMLMediaElement* element = mDecoder->GetMediaElement();
|
||||
NS_ENSURE_TRUE(element, NS_ERROR_FAILURE);
|
||||
|
||||
rv = nsContentUtils::GetSecurityManager()->
|
||||
CheckLoadURIWithPrincipal(element->NodePrincipal(),
|
||||
mURI,
|
||||
nsIScriptSecurityManager::STANDARD);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = mChannel->Open(getter_AddRefs(mInput));
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче