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

Unified Diff: content/browser/frame_host/form_submission_throttle.cc

Issue 2910573002: Implement upgrade-insecure-requests in browser for frame requests (Closed)
Patch Set: update test expectations 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
Index: content/browser/frame_host/form_submission_throttle.cc
diff --git a/content/browser/frame_host/form_submission_throttle.cc b/content/browser/frame_host/form_submission_throttle.cc
index 5784bbfa3317bd268e36176c8fa916481c357b03..5a235d8698ee0244657d5532963e8b7fc36b6e88 100644
--- a/content/browser/frame_host/form_submission_throttle.cc
+++ b/content/browser/frame_host/form_submission_throttle.cc
@@ -60,8 +60,12 @@ FormSubmissionThrottle::CheckContentSecurityPolicyFormAction(bool is_redirect) {
RenderFrameHostImpl* render_frame =
handle->frame_tree_node()->current_frame_host();
+ // TODO(estark): Move this check into NavigationRequest and split it into (1)
+ // check report-only CSP, (2) upgrade request if needed, (3) check enforced
+ // CSP to match how frame-src works. https://crbug.com/713388
nasko 2017/06/05 21:31:49 Alternatively, we can see if it makes sense to hav
estark 2017/06/06 19:16:14 Acknowledged. I agree it could be nice to allow th
if (render_frame->IsAllowedByCsp(CSPDirective::FormAction, url, is_redirect,
- handle->source_location())) {
+ handle->source_location(),
+ CSPContext::CHECK_ALL_CSP)) {
return NavigationThrottle::PROCEED;
}

Powered by Google App Engine
This is Rietveld 408576698