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

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

Issue 845303003: Tag SecurityContext objects as being hosted in reserved IP ranges. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Skip 'about:blank', 'swappedout://', etc. Created 5 years, 11 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
« Source/core/dom/SecurityContext.h ('K') | « Source/core/dom/SecurityContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/MixedContentChecker.cpp
diff --git a/Source/core/loader/MixedContentChecker.cpp b/Source/core/loader/MixedContentChecker.cpp
index eaf260815cb566521c37d83f28b53c8df68713b3..7cab790dc27f2430228f860b39dcea0a098875e3 100644
--- a/Source/core/loader/MixedContentChecker.cpp
+++ b/Source/core/loader/MixedContentChecker.cpp
@@ -402,13 +402,12 @@ void MixedContentChecker::checkMixedPrivatePublic(LocalFrame* frame, const Atomi
if (!frame || !frame->document() || !frame->document()->loader())
return;
- KURL documentIP(ParsedURLString, "http://" + frame->document()->loader()->response().remoteIPAddress());
KURL resourceIP(ParsedURLString, "http://" + resourceIPAddress);
// Just count these for the moment, don't block them.
//
// FIXME: Once we know how we want to check this, adjust the platform APIs to avoid the KURL construction.
- if (Platform::current()->isReservedIPAddress(resourceIP) && !Platform::current()->isReservedIPAddress(documentIP))
+ if (Platform::current()->isReservedIPAddress(resourceIP) && !frame->document()->isHostedInReservedIPRange())
UseCounter::count(frame->document(), UseCounter::MixedContentPrivateHostnameInPublicHostname);
}
« Source/core/dom/SecurityContext.h ('K') | « Source/core/dom/SecurityContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698