mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1215745: Safer implemetation of nsJarChannel::AsyncOpen2. r=ckerschb
This commit is contained in:
parent
c0d2ada691
commit
a7059223c3
@ -989,15 +989,10 @@ nsJARChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *ctx)
|
||||
NS_IMETHODIMP
|
||||
nsJARChannel::AsyncOpen2(nsIStreamListener *aListener)
|
||||
{
|
||||
if (!mLoadInfo) {
|
||||
MOZ_ASSERT(mLoadInfo, "can not enforce security without loadInfo");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
// setting the flag on the loadInfo indicates that the underlying
|
||||
// channel will be openend using AsyncOpen2() and hence performs
|
||||
// the necessary security checks.
|
||||
mLoadInfo->SetEnforceSecurity(true);
|
||||
return AsyncOpen(aListener, nullptr);
|
||||
nsCOMPtr<nsIStreamListener> listener = aListener;
|
||||
nsresult rv = nsContentSecurityManager::doContentSecurityCheck(this, listener);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return AsyncOpen(listener, nullptr);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
Loading…
Reference in New Issue
Block a user