зеркало из https://github.com/mozilla/pjs.git
Bug 451958. Add more CheckLoadURIs (part 3). r+sr=roc
--HG-- extra : rebase_source : e4fbaea74fa01592896982d4c3862fa8a0ad86dd
This commit is contained in:
Родитель
13da3bdfba
Коммит
94c30b7a97
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче