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

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

Issue 2749863002: CSP: Prevent form-action to leak path on redirect. (Closed)
Patch Set: 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 fd31c7bb45871c054a182fb7c16e5c39aa1fb9fa..9452e93d78e69644abb95dd49988c772c08ae160 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1654,8 +1654,9 @@ NavigationPolicy FrameLoader::shouldContinueForNavigationPolicy(
type == NavigationTypeFormResubmitted;
if (isFormSubmission &&
!m_frame->document()->contentSecurityPolicy()->allowFormAction(
- request.url()))
+ request.url(), request.redirectStatus())) {
return NavigationPolicyIgnore;
+ }
bool replacesCurrentHistoryItem =
frameLoadType == FrameLoadTypeReplaceCurrentItem;
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698