DescriptionAllow view-source of pages fully blocked by blinks XSS filter.
Unlike the other kinds of errors which are detected earlier in navigation
(SSL certs, etc), when the Blink reflected XSS filter encounters an
XSS and the page needs to be blocked (per the server's request), we
already are have a commited navigation, and are well past the point
where interstitials and the like would do us any good.
Consequently, blink just aborts the load, and schedules a navigation to
data:, with history replacement enabled, so that the offending entry
is lost (note https://codereview.chromium.org/301163006/ changes this
behaviour blink-side to add to the back-forward list).
This is less than ideal when a webmaster would like to do a view-source on
the offending page so as to diagnose the cause, so what I've done is to set
up a way to flag the offending entry when the reflection is detected.
I'd really like to just continue with navigating to data:, rather than
trying to deal with the UX issue -- there's nothing to be done, and
screaming about XSS isn't helpful to the user -- and we aren't going
to ever add a "revisit the page with protection disabled" option neither.
So, when a block is detected, we make an IPC call to flag the current entry
in the navigation controller. The navigation then continues to data:,.
When we encounter a view-source on the data:, page URL, we check if the
previous page was explicitly flagged prior to the block. If so, show its
source instead.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283728
Patch Set 1 #
Total comments: 1
Patch Set 2 : Plumb callback through to browser and mark entry. #Patch Set 3 : Remove stray debugging include. #
Total comments: 1
Patch Set 4 : Pass page_id. #Patch Set 5 : Don't require keeping the old navigation entry in the actual history. #Patch Set 6 : Rename, add comment. #Patch Set 7 : Clear blocked_page_entry_ on any non-conforming navigation. #Patch Set 8 : Add Unit Test. #
Total comments: 4
Patch Set 9 : Address Nasko's comments. #Patch Set 10 : Add xss_detected_ bool and use it. #
Total comments: 5
Patch Set 11 : Better comments, TODO for persisiting state. #Patch Set 12 : Rebase, resolve conflict. #Patch Set 13 : Rebase for landing. #Messages
Total messages: 25 (0 generated)
|