New issue
Advanced search Search tips

Issue 780028 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug
Team-Security-UX

Blocking:
issue 780023



Sign in to add a comment

Allow NavigationThrottle cancellations from request start and redirect to provide custom error page HTML

Project Member Reported by est...@chromium.org, Oct 31 2017

Issue description

https://chromium-review.googlesource.com/c/chromium/src/+/625337 makes it so that NavigationThrottle::WillFailRequest can return custom error page HTML which will be committed as the error page.

For Supervised User interstitials, we additionally need NavigationThrottle::WillStartRequest and WillRedirectRequest to be able to provide custom error page HTML when they cancel requests. These methods can already provide error page HTML in the ThrottleCheckResult, but it's not plumbed through to commit it in the error page.

To do so, we need to add an optional error_page_html argument to NavigationRequest::OnRequestFailedInternal, and pass error_page_html to CommitErrorPage(). OnStartChecksComplete() and OnRedirectChecksComplete() should pass the error page HTML from the ThrottleCheckResult into OnRequestFailedInternal.

We will also need to remove the DCHECKs in OnStartChecksComplete and OnRedirectChecksComplete that check that CANCEL uses a net error code of ERR_ABORTED. Throttles should be able to cancel requests with an error code of their choice, just as they can from WillFailRequest.
 

Comment 1 by est...@chromium.org, Oct 31 2017

Blocking: 780023

Comment 2 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt
Status: Started (was: Assigned)
https://chromium-review.googlesource.com/c/chromium/src/+/768930

> We will also need to remove the DCHECKs in OnStartChecksComplete and OnRedirectChecksComplete that check that CANCEL uses a net error code of ERR_ABORTED. Throttles should be able to cancel requests with an error code of their choice, just as they can from WillFailRequest.

As discussed in person, we plan to use ERR_BLOCKED_BY_CLIENT for supervised user interstitials. The CL only adds support for BLOCK_REQUEST/BLOCK_REQUEST_AND_COLLAPSE actions with the net::ERR_BLOCKED_BY_CLIENT error code.
Cc: est...@chromium.org
Owner: carlosil@chromium.org
Stealing this bug since I was about to file a very similar one.

Comment 5 by est...@chromium.org, Feb 18 2018

Labels: -Hotlist-EnamelAndFriendsFixIt
Status: Fixed (was: Started)
This was covered by the changes ortuno@ made in crrev.com/c/816457.

Sign in to add a comment