Reject IPC requests for isolated origin, sent by non-isolated renderer.
The CL tweaks StoragePartitonInterceptor (in isolated_origin_browsertest.cc) so that it can be configured to inject different origins, depending on needs of individual tests. This tweak is supported by changes in base/lazy_instance.h (adding of inequality operator implemented on top of the already existing equality operator), and in render_process_host_impl.cc/.h (to support creating a test-only StoragePartitionService via a base::Callback, rather than via a function pointer). Tweaks of StoragePartitonInterceptor allow forking of IsolatedOriginTest.LocalStorageOriginEnforcement test into 2 separate tests: - LocalStorageOriginEnforcement_IsolatedAccessingNonIsolated - LocalStorageOriginEnforcement_NonIsolatedAccessingIsolated The second test is introduced by this CL and was failing before this CL. Tweaks of ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin disallow requests from non-isolated renderers (in which case CheckOriginLock will return NO_LOCK) if the request is for an isolated origin. This makes the new test pass. Bug: 509125, 764958 Change-Id: Ibfff2c91cb2ac51966e1d89295f10592a3814c08 Reviewed-on: https://chromium-review.googlesource.com/775060 Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Reviewed-by:Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#521838}
Showing
Please register or sign in to comment