Removed forced sandbox flags.
With real users, we are seeing unexpected difference in between the sandbox flags computed from the renderer and the browser process. This is implemented by those two functions: - content::NavigationRequest::ComputeSandboxFlagsToCommit() - blink::FrameLoader::CalculateSandboxFlags After a navigation, the new document gets sandbox_flags from: - FramePolicy.sandbox, which contains everything except CSP. - The response's CSP sandbox. That's basically it. Both function does the same and are fed from the same data. The only difference is blink, which used "forced_sandbox_flags". This looked a bit mysterious at first. It turns out to be needed only for setting the sandbox flags for the initial empty document and the second 'initial empty document'. (e.g. not via navigation). Removing forced_sandbox_flags from CalculateSandboxFlags helps guaranteeing both browser side and renderer side computation always match. This make it explicit in the code from where the inheritance happens. This patch aligns inheriting sandbox from the opener with "OpenerFeatureState" (1), by moving it toward Frame, instead of the FrameLoader. (1) Turns out this will be removed: https://chromium-review.googlesource.com/c/chromium/src/+/2564396 Change-Id: I7098b459e485485630ab9edc99d392fcdbfdef4e Bug: 1153708 Fixed: 1153708 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2573362 Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by:Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#834660}
Showing
Please register or sign in to comment