This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 971
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix websockets bypass in Brave filtering
Fix #6997. Note: this works around the issue of websocket requests being associated with tabId -1, which seems wrong and is why websocket URLs do not show up in the Bravery Panel stats. Auditors: @bridiver Test Plan: covered by automated test
- Loading branch information
1 parent
f7a5e17
commit 145d84b
Showing
4 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div id='result'></div> | ||
<div id='errorTime'></div> | ||
<script> | ||
// This should get blocked by adblock if it is on | ||
var exampleSocket = new WebSocket("ws://ag.innovid.com/dv/sync?tid=2"); | ||
exampleSocket.onerror = (e) => { | ||
document.getElementById('errorTime').innerText = e.timeStamp | ||
} | ||
// This should be a valid connection | ||
var ws = new WebSocket("wss://wss.websocketstest.com:443/service") | ||
ws.onopen = function() { | ||
document.getElementById('result').innerText = 'success' | ||
} | ||
</script> |