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

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

Issue 745053002: Grant access to files in PageState, which have already been validated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 6 years, 1 month 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/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index b1b2eb400d02fcd5a9e24badf3656c56998cdefb..d479a0fc7ab9bf1af2d968190328ab23dfa05dfc 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1320,6 +1320,15 @@ void RenderFrameHostImpl::Navigate(const FrameMsg_Navigate_Params& params) {
}
}
+ // We may be returning to an existing NavigationEntry that had been granted
+ // file access. If this is a different process, we will need to grant the
+ // access again. The files listed in the page state are validated when they
+ // are received from the renderer to prevent abuse.
+ if (params.commit_params.page_state.IsValid()) {
+ render_view_host_->GrantFileAccessFromPageState(
+ params.commit_params.page_state);
+ }
+
// Only send the message if we aren't suspended at the start of a cross-site
// request.
if (navigations_suspended_) {

Powered by Google App Engine
This is Rietveld 408576698