Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: third_party/WebKit/Source/core/loader/MixedContentChecker.cpp

Issue 1931063004: Stop blocking 'http://127.0.0.1/' as mixed content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
diff --git a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
index effce10dc0bf0b6db71129c7f1e2a7c1b2b6ebf1..81b0a26b225f3e26f491acbd5b8dcda6d3d4e70f 100644
--- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
+++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
@@ -87,8 +87,9 @@ bool MixedContentChecker::isMixedContent(SecurityOrigin* securityOrigin, const K
if (!SchemeRegistry::shouldTreatURLSchemeAsRestrictingMixedContent(securityOrigin->protocol()))
return false;
- // We're in a secure context, so |url| is mixed content if it's insecure.
- return !SecurityOrigin::isSecure(url);
+ // |url| is mixed content if its origin is not potentially trustworthy, and
+ // its protocol is not 'data'.
+ return !(SecurityOrigin::create(url)->isPotentiallyTrustworthy() || url.protocolIsData());
}
// static

Powered by Google App Engine
This is Rietveld 408576698