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

Issue 1308703002: Block Service Workers containing parts of their query string as XSS.

Created:
5 years, 4 months ago by jeremyarcher
Modified:
5 years, 3 months ago
Reviewers:
jww, Tom Sepez
CC:
blink-reviews, falken, kinuko
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Block Service Workers containing parts of their query string as XSS. In particular, this avoids errors with ?callback= URLs serving data as text/javascript. BUG=422966

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -1 line) Patch
M Source/web/WebEmbeddedWorkerImpl.h View 1 chunk +2 lines, -0 lines 1 comment Download
M Source/web/WebEmbeddedWorkerImpl.cpp View 4 chunks +51 lines, -1 line 2 comments Download

Messages

Total messages: 5 (2 generated)
jww
https://codereview.chromium.org/1308703002/diff/1/Source/web/WebEmbeddedWorkerImpl.h File Source/web/WebEmbeddedWorkerImpl.h (right): https://codereview.chromium.org/1308703002/diff/1/Source/web/WebEmbeddedWorkerImpl.h#newcode131 Source/web/WebEmbeddedWorkerImpl.h:131: String checkForReflectedXSS(); We might want to generalize this in ...
5 years, 4 months ago (2015-08-21 17:55:47 UTC) #2
jeremyarcher
+tsepez for security review (once !OoO) +falken, kinuko for code structure. Feel free to bump ...
5 years, 3 months ago (2015-08-27 06:47:22 UTC) #4
Tom Sepez
5 years, 3 months ago (2015-08-31 16:41:19 UTC) #5
I suspect this will be easy to bypass and will have large false positive rates,
etc.

Take a look at the details of XSSAuditor.cpp.  I', sorry but I don't think this
buys us much without a lot more sophistication.

https://codereview.chromium.org/1308703002/diff/1/Source/web/WebEmbeddedWorke...
File Source/web/WebEmbeddedWorkerImpl.cpp (right):

https://codereview.chromium.org/1308703002/diff/1/Source/web/WebEmbeddedWorke...
Source/web/WebEmbeddedWorkerImpl.cpp:339: if (segment.sizeInBytes() > 20) {
why 20?

https://codereview.chromium.org/1308703002/diff/1/Source/web/WebEmbeddedWorke...
Source/web/WebEmbeddedWorkerImpl.cpp:341: if (script.contains(segment)) {
what about multiple decodings? e.g. %2525332 etc. See XSSAuditor.

Powered by Google App Engine
This is Rietveld 408576698