Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Issue 301813002: Highlight relfected XSS vectors in view-source page. (Closed)

Created:
6 years, 6 months ago by Tom Sepez
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-css, blink-reviews-html_chromium.org, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis, abarth-chromium
Visibility:
Public.

Description

Make HTMLViewSourceParser also run the XSSAuditor when it is creating a view source page, and mark the tokens that it thinks are reflected XSS vectors using a red highlight. This happens to work at the moment in both "rewrite" and "block" xss protection modes, because we don't use the modified token when constructing the view source page. Ideally, the logic about what mode to use should move out of XSSAuditor, so that view-source can pass in a value suitable for this specific case. Tangentially related to the "XSS Auditor is silent" bug. BUG=93976 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175320

Patch Set 1 #

Total comments: 5

Patch Set 2 : Add enum, tests (but not yet tests results). #

Patch Set 3 : Add tooltip text. #

Patch Set 4 : Add expected test results. #

Patch Set 5 : Rebase #

Patch Set 6 : Update descriptive text in test cases. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -12 lines) Patch
A LayoutTests/http/tests/security/xssAuditor/viewsource-onmouseover.html View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/xssAuditor/viewsource-onmouseover-expected.txt View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/xssAuditor/viewsource-script-tag.html View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/xssAuditor/viewsource-script-tag-expected.txt View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
M Source/core/css/view-source.css View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLViewSourceDocument.h View 1 2 3 4 2 chunks +11 lines, -4 lines 0 comments Download
M Source/core/html/HTMLViewSourceDocument.cpp View 1 2 3 4 8 chunks +25 lines, -7 lines 0 comments Download
M Source/core/html/parser/HTMLViewSourceParser.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLViewSourceParser.cpp View 1 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
Tom Sepez
Adam, Mike, let me know what you think. Thanks.
6 years, 6 months ago (2014-05-28 20:50:52 UTC) #1
Mike West
Adam is OOO for a while, moving him to CC; Eric might be a good ...
6 years, 6 months ago (2014-05-29 09:29:48 UTC) #2
eseidel
My impression is that view-source is pretty slow anyway due to counters... but lgtm. https://codereview.chromium.org/301813002/diff/1/Source/core/html/HTMLViewSourceDocument.h ...
6 years, 6 months ago (2014-05-29 14:28:11 UTC) #3
Tom Sepez
Two things to to note: 1. Testing is a bear because there doesn't appear to ...
6 years, 6 months ago (2014-05-29 17:17:24 UTC) #4
jww
Any chance we could add a hover note to the highlighted elements to explain why ...
6 years, 6 months ago (2014-05-29 18:35:01 UTC) #5
Tom Sepez
On 2014/05/29 18:35:01, jww wrote: > Any chance we could add a hover note to ...
6 years, 6 months ago (2014-05-29 20:27:56 UTC) #6
jasvir1
+1 on the change especially with tooltip highlighting to explain why a filespan was highlighted. ...
6 years, 6 months ago (2014-05-29 20:40:10 UTC) #7
Tom Sepez
> What happens in the bug 93976 case where if you visit a > view-source:http://someurl ...
6 years, 6 months ago (2014-05-29 20:57:11 UTC) #8
Tom Sepez
Testing blocked on https://codereview.chromium.org/302043002/
6 years, 6 months ago (2014-05-29 20:59:19 UTC) #9
apavlov
Folks, should this perhaps be a part of the DevTools, too? That could drastically increase ...
6 years, 6 months ago (2014-05-30 08:43:38 UTC) #10
Tom Sepez
@apavlov - such integration sounds good, but isn't straightforward since XSSAuditor removes the offending source. ...
6 years, 6 months ago (2014-05-30 17:49:03 UTC) #11
apavlov
On 2014/05/30 17:49:03, Tom Sepez wrote: > @apavlov - such integration sounds good, but isn't ...
6 years, 6 months ago (2014-05-31 18:57:43 UTC) #12
Tom Sepez
The CQ bit was checked by tsepez@chromium.org
6 years, 6 months ago (2014-06-02 19:39:48 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tsepez@chromium.org/301813002/100001
6 years, 6 months ago (2014-06-02 19:40:36 UTC) #14
commit-bot: I haz the power
6 years, 6 months ago (2014-06-02 21:43:35 UTC) #15
Message was sent while issue was closed.
Change committed as 175320

Powered by Google App Engine
This is Rietveld 408576698