diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2017-11-21 13:24:32 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-08 19:55:11 +0100 |
commit | ef720ec2507fafcb67b5ef1a1ef34a2aae5b5868 (patch) | |
tree | 10ee9000db89c37557f8ebac67a7e31511b8aa39 /dom/security | |
parent | 424eeaaa5994fa1582e24ec945189f6eeb738111 (diff) | |
download | UXP-ef720ec2507fafcb67b5ef1a1ef34a2aae5b5868.tar UXP-ef720ec2507fafcb67b5ef1a1ef34a2aae5b5868.tar.gz UXP-ef720ec2507fafcb67b5ef1a1ef34a2aae5b5868.tar.lz UXP-ef720ec2507fafcb67b5ef1a1ef34a2aae5b5868.tar.xz UXP-ef720ec2507fafcb67b5ef1a1ef34a2aae5b5868.zip |
Explicitly cancel channel after mixed content redirect.
Diffstat (limited to 'dom/security')
-rw-r--r-- | dom/security/nsMixedContentBlocker.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dom/security/nsMixedContentBlocker.cpp b/dom/security/nsMixedContentBlocker.cpp index a9aca5333..4e80dce3f 100644 --- a/dom/security/nsMixedContentBlocker.cpp +++ b/dom/security/nsMixedContentBlocker.cpp @@ -337,7 +337,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 @@ -358,6 +362,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; } |