Fix the permanent back trapping using same document entries This fix enhances the history manipulation intervention such that same document entries cannot be used to achieve permanent back trapping. The original intervention stops working when there is a user activation which does not get cleared after the user goes back and forth between same document entries. So creating new same document entries becomes a way to hijack the back button. This enhancement fixes the following scenario: 1. History contains [new-tab-page, a*] 2. A gets a click and adds a same-document entry a1 => [new-tab-page, a, a1*] 3. User goes back to a via the back button [new-tab-page, a*, a1] 4. Without any new user activation, a adds another new same document entry a2. Page a should now be marked as skippable. [new-tab-page, a(skip), a2*] 5. Now when the user goes back, they should land on new-tab-page. Bug: 1248529 Change-Id: I6de52ab75aef151abd65d4a02de56bd7f791eb19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3182862 Commit-Queue: Shivani Sharma <shivanisha@chromium.org> Reviewed-by: Charlie Reis <creis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1248715}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.