New issue
Advanced search Search tips

Issue 817514 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 661629



Sign in to add a comment

tab-under blocking can exhibit strange blocking behavior with redirects

Project Member Reported by csharrison@chromium.org, Feb 28 2018

Issue description

Our tab-under blocking logic uses the following classification

// Currently, navigations are considered tab-unders if:
// 1. It is a navigation that is "suspicious"
//    a. It has no user gesture.
//    b. It is renderer-initiated.
//    c. It is cross origin to the last committed URL in the tab.
// 2. The tab has opened a popup and hasn't received a user gesture since then.
//    This information is tracked by the PopupOpenerTabHelper.

Currently, we look at the popup condition (2), on every redirect. This leads to strange behavior if the popup condition changes after the navigation starts:
1. Navigate to a.com
2. Start a navigation without a user gesture to b.com, it is not blocked
3. Open a popup, via direct user interaction with a.com
4. Navigation from (2) redirects and is blocked

We should fix this by computing the popup condition at navigation start and merely checking if redirects are classified as "suspicious".
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/44f23ca2e289faa8ae80415b7a3e50b3df1b4955

commit 44f23ca2e289faa8ae80415b7a3e50b3df1b4955
Author: Charles Harrison <csharrison@chromium.org>
Date: Thu Mar 01 01:54:54 2018

[tab-under] Only check the popup condition at start

Currently, tab-unders require that the tab has opened a popup since
the last user gesture in the tab. However, we check this condition
on every navigation redirect, which is wrong.

For example:
1. Navigate to a.com
2. Start a navigation without a user gesture to b.com
3. Open a popup
4. Navigation from (2) redirects and should not be blocked.

This is fixed by checking the popup condition once at the start
of the navigation.

This CL also makes a couple of `bool` members const.

Bug:  817514 
Change-Id: I9ddcd383fa299d8d560889b2d0e393114b5afa96
Reviewed-on: https://chromium-review.googlesource.com/941923
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539980}
[modify] https://crrev.com/44f23ca2e289faa8ae80415b7a3e50b3df1b4955/chrome/browser/ui/blocked_content/popup_opener_tab_helper_unittest.cc
[modify] https://crrev.com/44f23ca2e289faa8ae80415b7a3e50b3df1b4955/chrome/browser/ui/blocked_content/tab_under_navigation_throttle.cc
[modify] https://crrev.com/44f23ca2e289faa8ae80415b7a3e50b3df1b4955/chrome/browser/ui/blocked_content/tab_under_navigation_throttle.h

Status: Verified (was: Started)

Sign in to add a comment