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

Unified Diff: background.js

Issue 29347034: Issue 1727 - Prevent circumvention via WebSocket (Closed)
Patch Set: Created June 26, 2016, 11:55 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include.preload.js » ('j') | include.preload.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
diff --git a/background.js b/background.js
index 3e2eb08be89145c56ce79fe3ad3d676b8a4655dd..971f7a2838d84c3f5a116b8de65bd7bcda88fc6f 100644
--- a/background.js
+++ b/background.js
@@ -41,6 +41,17 @@ port.on("get-selectors", function(msg, sender)
return {selectors: selectors, trace: trace};
});
+port.on("websocket-request", function(msg, sender)
Sebastian Noack 2016/06/28 16:17:51 Please no new code in background.js. This file is
kzar 2016/06/29 13:40:30 Done.
+{
+ var results = ext.webRequest.onBeforeRequest._dispatch(
+ new URL(msg.url),
Sebastian Noack 2016/06/28 16:17:51 Is it possible to create a WebSocket with a relati
kzar 2016/06/29 13:40:30 No, I don't believe it's possible. (I see an excep
lainverse 2016/06/29 13:54:58 As I understood you must pass FQDN URL. At least f
Sebastian Noack 2016/07/01 17:03:39 Ah right. Of course it needs to be an absolute URL
+ "OTHER",
+ sender.page,
+ sender.frame
+ );
+ return results.indexOf(false) != -1;
+});
+
port.on("forward", function(msg, sender)
{
var targetPage;
« no previous file with comments | « no previous file | include.preload.js » ('j') | include.preload.js » ('J')

Powered by Google App Engine
This is Rietveld