mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1148732 - When checking a document's scheme, check the innermost uri. r=dveditz, smaug
This commit is contained in:
parent
0c32cb5990
commit
ac8b060203
@ -565,7 +565,14 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
|
||||
// Check the parent scheme. If it is not an HTTPS page then mixed content
|
||||
// restrictions do not apply.
|
||||
bool parentIsHttps;
|
||||
nsresult rv = requestingLocation->SchemeIs("https", &parentIsHttps);
|
||||
nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(requestingLocation);
|
||||
if (!innerURI) {
|
||||
NS_ERROR("Can't get innerURI from requestingLocation");
|
||||
*aDecision = REJECT_REQUEST;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv = innerURI->SchemeIs("https", &parentIsHttps);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("requestingLocation->SchemeIs failed");
|
||||
*aDecision = REJECT_REQUEST;
|
||||
|
Loading…
Reference in New Issue
Block a user