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

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

Issue 2898973002: PlzNavigate: Fix missing console warning. (Closed)
Patch Set: Add http/tests/inspector/service-workers/service-workers-redundant.html again. Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 5bc3baacfc881129f9e342c99a4963cb7befe6e5..0f41ea9609c116a0068f73825b0c2e64136abc0e 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1307,6 +1307,19 @@ NavigationPolicy FrameLoader::ShouldContinueForNavigationPolicy(
if (request.Url().IsEmpty() || substitute_data.IsValid())
return kNavigationPolicyCurrentTab;
+ // Check for non-escaped new lines in the url.
+ if (request.Url().WhitespaceRemoved()) {
+ Deprecation::CountDeprecation(
+ frame_, UseCounter::kCanRequestURLHTTPContainingNewline);
+ if (request.Url().ProtocolIsInHTTPFamily()) {
+ if (RuntimeEnabledFeatures::restrictCanRequestURLCharacterSetEnabled())
+ return kNavigationPolicyIgnore;
+ } else {
+ UseCounter::Count(frame_,
+ UseCounter::kCanRequestURLNonHTTPContainingNewline);
+ }
+ }
+
Settings* settings = frame_->GetSettings();
if (MaybeCheckCSP(request, type, frame_, policy,
should_check_main_world_content_security_policy ==
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698