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

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

Issue 2656443005: Block 'ftp:' subresource requests from non-'ftp:' pages. (Closed)
Patch Set: test Created 3 years, 10 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/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index e301c9dbf93e549a94e2437df848e0796b4bd5e8..dc641a6aded042f8c6ee8d9a1520c12dbaad2d49 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -796,6 +796,11 @@ ResourceRequestBlockedReason FrameFetchContext::canRequestInternal(
frame()->document()->getSecurityOrigin()->protocol())) {
Deprecation::countDeprecation(
frame()->document(), UseCounter::LegacyProtocolEmbeddedAsSubresource);
+
+ // TODO(mkwst): Drop the runtime-enabled check in M59:
+ // https://www.chromestatus.com/feature/5709390967472128
+ if (RuntimeEnabledFeatures::blockLegacySubresourcesEnabled())
+ return ResourceRequestBlockedReason::Origin;
}
if (!url.user().isEmpty() || !url.pass().isEmpty()) {
Deprecation::countDeprecation(

Powered by Google App Engine
This is Rietveld 408576698