Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29394585: Issue 5027 - Use updated webRequest API for WebSocket blocking (Closed)

Created:
March 24, 2017, 1 p.m. by Jon Sonesen
Modified:
April 24, 2017, 7:15 a.m.
Reviewers:
Sebastian Noack, kzar
Visibility:
Public.

Description

Issue 5027 - Removes CSP workaround for websockets on Chrome >= 58

Patch Set 1 #

Total comments: 6

Patch Set 2 : fixed request blocker logic and added changes to csp.js #

Total comments: 3

Patch Set 3 : fixed logic at websocket wrapper #

Total comments: 9

Patch Set 4 : adds comments, change comment to fix lint error from added indentation #

Total comments: 7

Patch Set 5 : addresses bad comments, and actually fixes requestBlocker logic #

Total comments: 8

Patch Set 6 : change comment grammer, fix line wrapping #

Total comments: 3

Patch Set 7 : change 'see' statements to be consistent #

Patch Set 8 : change commit message, add chrome version to include.preload.js comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -52 lines) Patch
M chrome/ext/background.js View 1 chunk +1 line, -1 line 0 comments Download
M include.preload.js View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M lib/csp.js View 1 2 3 4 5 6 1 chunk +45 lines, -39 lines 0 comments Download
M lib/requestBlocker.js View 1 2 3 4 5 6 1 chunk +15 lines, -8 lines 0 comments Download
M metadata.chrome View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 36
Jon Sonesen
March 24, 2017, 1 p.m. (2017-03-24 13:00:45 UTC) #1
Jon Sonesen
https://codereview.adblockplus.org/29394585/diff/29394586/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29394585/diff/29394586/lib/requestBlocker.js#newcode158 lib/requestBlocker.js:158: return; This will cause connections created in shared workers ...
March 24, 2017, 1:04 p.m. (2017-03-24 13:04:43 UTC) #2
Sebastian Noack
https://codereview.adblockplus.org/29394585/diff/29394586/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29394585/diff/29394586/lib/requestBlocker.js#newcode157 lib/requestBlocker.js:157: if (ext.webRequest.hasOwnProperty("RequestType.WEBSOCKET")) Does that even work? I think this ...
March 24, 2017, 5:45 p.m. (2017-03-24 17:45:02 UTC) #3
Jon Sonesen
One thing to mention and I will also try to disclaim this when uploading patch ...
March 26, 2017, 12:38 p.m. (2017-03-26 12:38:55 UTC) #4
Jon Sonesen
On 2017/03/26 12:38:55, Jon Sonesen wrote: > One thing to mention and I will also ...
March 27, 2017, 6:55 a.m. (2017-03-27 06:55:38 UTC) #5
Jon Sonesen
March 27, 2017, 6:55 a.m. (2017-03-27 06:55:42 UTC) #6
Sebastian Noack
On 2017/03/27 06:55:38, Jon Sonesen wrote: > Oh one thing to mention is that I ...
March 27, 2017, 7:52 a.m. (2017-03-27 07:52:10 UTC) #7
Jon Sonesen
Here is my next stab at it, to test these changes I have used the ...
March 27, 2017, 11:58 a.m. (2017-03-27 11:58:57 UTC) #8
Sebastian Noack
https://codereview.adblockplus.org/29394585/diff/29395668/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29394585/diff/29395668/lib/requestBlocker.js#newcode155 lib/requestBlocker.js:155: if ("WEBSOCKET" in chrome.webRequest.ResourceType) It seems this check should ...
March 27, 2017, 12:13 p.m. (2017-03-27 12:13:36 UTC) #9
Jon Sonesen
https://codereview.adblockplus.org/29394585/diff/29395668/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29394585/diff/29395668/lib/requestBlocker.js#newcode155 lib/requestBlocker.js:155: if ("WEBSOCKET" in chrome.webRequest.ResourceType) On 2017/03/27 12:13:36, Sebastian Noack ...
March 27, 2017, 12:35 p.m. (2017-03-27 12:35:23 UTC) #10
Sebastian Noack
LGTM
March 27, 2017, 12:38 p.m. (2017-03-27 12:38:42 UTC) #11
kzar
https://codereview.adblockplus.org/29394585/diff/29395673/lib/csp.js File lib/csp.js (right): https://codereview.adblockplus.org/29394585/diff/29395673/lib/csp.js#newcode20 lib/csp.js:20: if (!("WEBSOCKET" in chrome.webRequest.ResourceType)) Mind adding a comment to ...
March 28, 2017, 5:38 a.m. (2017-03-28 05:38:14 UTC) #12
Sebastian Noack
https://codereview.adblockplus.org/29394585/diff/29395673/metadata.chrome File metadata.chrome (right): https://codereview.adblockplus.org/29394585/diff/29395673/metadata.chrome#newcode9 metadata.chrome:9: ws://*/* On 2017/03/28 05:38:13, kzar wrote: > I wonder ...
March 28, 2017, 5:58 a.m. (2017-03-28 05:58:19 UTC) #13
kzar
On 2017/03/28 05:58:19, Sebastian Noack wrote: > But we probably should double check, therefore however, ...
March 28, 2017, 6:20 a.m. (2017-03-28 06:20:22 UTC) #14
Jon Sonesen
On 2017/03/28 06:20:22, kzar wrote: > On 2017/03/28 05:58:19, Sebastian Noack wrote: > > But ...
March 28, 2017, 6:31 a.m. (2017-03-28 06:31:37 UTC) #15
Jon Sonesen
https://codereview.adblockplus.org/29394585/diff/29395673/lib/csp.js File lib/csp.js (right): https://codereview.adblockplus.org/29394585/diff/29395673/lib/csp.js#newcode20 lib/csp.js:20: if (!("WEBSOCKET" in chrome.webRequest.ResourceType)) On 2017/03/28 05:38:13, kzar wrote: ...
March 28, 2017, 1:03 p.m. (2017-03-28 13:03:14 UTC) #16
Sebastian Noack
https://codereview.adblockplus.org/29394585/diff/29395673/lib/csp.js File lib/csp.js (right): https://codereview.adblockplus.org/29394585/diff/29395673/lib/csp.js#newcode43 lib/csp.js:43: // not inherited from the parent for documents with ...
March 28, 2017, 1:48 p.m. (2017-03-28 13:48:09 UTC) #17
Sebastian Noack
https://codereview.adblockplus.org/29394585/diff/29396613/lib/csp.js File lib/csp.js (right): https://codereview.adblockplus.org/29394585/diff/29396613/lib/csp.js#newcode20 lib/csp.js:20: // Versions of Chrome < 58 do not support ...
March 28, 2017, 2:33 p.m. (2017-03-28 14:33:44 UTC) #18
Jon Sonesen
Sorry for the oversights on the comments, also realized I never even changed the logic ...
March 28, 2017, 7:18 p.m. (2017-03-28 19:18:30 UTC) #19
Sebastian Noack
https://codereview.adblockplus.org/29394585/diff/29396638/lib/csp.js File lib/csp.js (right): https://codereview.adblockplus.org/29394585/diff/29396638/lib/csp.js#newcode20 lib/csp.js:20: // Versions of Chrome < 58 the webRequest API ...
March 28, 2017, 7:32 p.m. (2017-03-28 19:32:30 UTC) #20
Jon Sonesen
Patch Set 6 Hopefully this is better, noticed colon which seems wrong in the CSP ...
March 28, 2017, 8:10 p.m. (2017-03-28 20:10:31 UTC) #21
Sebastian Noack
https://codereview.adblockplus.org/29394585/diff/29396650/lib/csp.js File lib/csp.js (right): https://codereview.adblockplus.org/29394585/diff/29396650/lib/csp.js#newcode21 lib/csp.js:21: // connections see: https://crbug.com/129353. Hence we inject CSP headers, ...
March 28, 2017, 8:20 p.m. (2017-03-28 20:20:43 UTC) #22
Jon Sonesen
Patch Set 7 I updated the comments to have consistent chromium links https://codereview.adblockplus.org/29394585/diff/29396650/lib/csp.js File lib/csp.js ...
March 28, 2017, 9:33 p.m. (2017-03-28 21:33:02 UTC) #23
Sebastian Noack
LGTM
March 28, 2017, 9:35 p.m. (2017-03-28 21:35:05 UTC) #24
kzar
> Issue 5027 - Removes CSP workaround for websockets on Chrome >= 58 The commit ...
March 29, 2017, 1:04 a.m. (2017-03-29 01:04:09 UTC) #25
kzar
What about the WebSocket wrapper in include.preload.js? That is the code that sends the "request.websocket" ...
March 29, 2017, 1:07 a.m. (2017-03-29 01:07:31 UTC) #26
Jon Sonesen
On 2017/03/29 01:04:09, kzar wrote: > > Issue 5027 - Removes CSP workaround for websockets ...
March 29, 2017, 6:04 a.m. (2017-03-29 06:04:18 UTC) #27
Jon Sonesen
On 2017/03/29 01:07:31, kzar wrote: > What about the WebSocket wrapper in include.preload.js? That is ...
March 29, 2017, 6:29 a.m. (2017-03-29 06:29:36 UTC) #28
Sebastian Noack
On 2017/03/29 06:29:36, Jon Sonesen wrote: > On 2017/03/29 01:07:31, kzar wrote: > > What ...
March 29, 2017, 7:09 a.m. (2017-03-29 07:09:23 UTC) #29
kzar
Jon wrote: > Thanks for pointing that out I will update that. Cool I'll wait ...
March 29, 2017, 9:59 a.m. (2017-03-29 09:59:04 UTC) #30
kzar
On 2017/03/29 09:59:04, kzar wrote: > Fair enough, I guess leaving the wrapper in place ...
March 29, 2017, 9:59 a.m. (2017-03-29 09:59:57 UTC) #31
Sebastian Noack
On 2017/03/29 09:59:57, kzar wrote: > On 2017/03/29 09:59:04, kzar wrote: > > Fair enough, ...
March 29, 2017, 10:02 a.m. (2017-03-29 10:02:47 UTC) #32
Sebastian Noack
On 2017/03/29 10:02:47, Sebastian Noack wrote: > There is also a comment for this purpose ...
March 29, 2017, 10:03 a.m. (2017-03-29 10:03:22 UTC) #33
Jon Sonesen
On 2017/03/29 10:02:47, Sebastian Noack wrote: > On 2017/03/29 09:59:57, kzar wrote: > > On ...
March 29, 2017, 12:03 p.m. (2017-03-29 12:03:06 UTC) #34
Sebastian Noack
LGTM
March 29, 2017, 12:12 p.m. (2017-03-29 12:12:00 UTC) #35
kzar
March 29, 2017, 1:57 p.m. (2017-03-29 13:57:11 UTC) #36
LGTM

Powered by Google App Engine
This is Rietveld