Opened on 10/25/2016 at 09:04:33 AM

Closed on 10/25/2016 at 01:08:47 PM

Last modified on 10/25/2016 at 04:03:36 PM

#4563 closed defect (rejected)

WebSocket wrapper breaking code that extends the WebSocket object

Reported by: kzar Assignee:
Priority: Unknown Milestone:
Module: Platform Keywords:
Cc: sebastian, mapx Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

ABP Ver: 1.12.2
Chrome 54.0.2840.71 (64-Bit)
OS X 10.11.6

Details

From this (now deleted) forum thread:

You have a breaking bug in your WrappedWebSocket's code. This will 100%
break any library that tries to extend the native WebSocket object. While I
found this issue in Chrome, I would assume that this issue extends to other
browsers as well.

I have identified the issue, on line 30 of the code you are checking if
this is an instance of WrappedWebSocket, because of how you constructed
your code it blocks the ability to extend WebSockets. Any class that would
now try extend WebSocket would get the the Window as this and not the
WrappedWebSocket's prototype, which causes them to fail your check even
though it is properly constructed.

Attachments (0)

Change History (3)

comment:1 Changed on 10/25/2016 at 10:51:55 AM by sebastian

This sounds very speculative. Note that our script wrapping the WebSocket constructor will run before any script by the page can run. So the original WebSocket isn't accessible anymore, instead such a script/library would get and extend our WrappedWebSocket object.

comment:2 Changed on 10/25/2016 at 01:08:47 PM by kzar

  • Resolution set to rejected
  • Status changed from new to closed

Yea, I can't figure this out either. I will mark this as rejected until the user can come back with an example of how this code is broken.

comment:3 Changed on 10/25/2016 at 04:03:36 PM by mapx

however, it seems chromium guys are adding support for websockets in webrequest API
https://bugs.chromium.org/p/chromium/issues/detail?id=129353#c77
https://codereview.chromium.org/2449913002/

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.