зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1402363: Explicitly cancel channel after mixed content redirect. r=honza,kate
This commit is contained in:
Родитель
481bdfb4f4
Коммит
8944f6c302
|
@ -394,7 +394,11 @@ nsMixedContentBlocker::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
|
|||
nullptr, // aExtra
|
||||
requestingPrincipal,
|
||||
&decision);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
autoCallback.DontCallback();
|
||||
aOldChannel->Cancel(NS_ERROR_DOM_BAD_URI);
|
||||
return NS_BINDING_FAILED;
|
||||
}
|
||||
|
||||
if (nsMixedContentBlocker::sSendHSTSPriming) {
|
||||
// The LoadInfo passed in is for the original channel, HSTS priming needs to
|
||||
|
@ -419,6 +423,7 @@ nsMixedContentBlocker::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
|
|||
// If the channel is about to load mixed content, abort the channel
|
||||
if (!NS_CP_ACCEPTED(decision)) {
|
||||
autoCallback.DontCallback();
|
||||
aOldChannel->Cancel(NS_ERROR_DOM_BAD_URI);
|
||||
return NS_BINDING_FAILED;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче