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

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

Issue 2689653003: PlzNavigate: Enforce 'form-action' CSP on the browser-side. (Closed)
Patch Set: Duplicate tests with a redirect. Created 3 years, 9 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/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index b0958995412bd27ebf3da25668dc1bb662229fd1..a1d16e05a52b6aa835d3581b357d686f89e52da4 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1662,6 +1662,13 @@ NavigationPolicy FrameLoader::shouldContinueForNavigationPolicy(
bool isFormSubmission = type == NavigationTypeFormSubmitted ||
type == NavigationTypeFormResubmitted;
if (isFormSubmission &&
+ // 'form-action' check in the frame that is navigating is disabled on the
+ // renderer side when PlzNavigate is enabled, but is enforced on the
+ // browser side instead.
+ // N.B. check in the frame that initiate the navigation stills occurs in
+ // blink and is not enforced on the browser-side.
+ // See https://crbug.com/700964
+ !browserSideNavigationEnabled &&
Mike West 2017/03/14 15:45:39 I'm fine with leaving this in, as long as we figur
arthursonzogni 2017/03/15 13:15:09 Done. BUG and TODO added.
!m_frame->document()->contentSecurityPolicy()->allowFormAction(
request.url()))
return NavigationPolicyIgnore;
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-blocked-with-redirect-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698