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

Unified Diff: lib/requestBlocker.js

Issue 29347034: Issue 1727 - Prevent circumvention via WebSocket (Closed)
Patch Set: Fix WebSocket.toString for Safari Created July 28, 2016, 8:04 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
« include.preload.js ('K') | « include.preload.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/requestBlocker.js
diff --git a/lib/requestBlocker.js b/lib/requestBlocker.js
index bb7e482e108dfb6d82778364b349a752a8cd4f99..3a674e3c51c62aa17ba7ae07271e37049bed2917 100644
--- a/lib/requestBlocker.js
+++ b/lib/requestBlocker.js
@@ -146,7 +146,7 @@ function onFilterChange(arg, isDisabledAction)
});
}
-FilterNotifier.on("subscription.added", onFilterChange)
+FilterNotifier.on("subscription.added", onFilterChange);
FilterNotifier.on("subscription.removed", onFilterChange);
FilterNotifier.on("subscription.updated", onFilterChange);
FilterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true));
@@ -154,3 +154,14 @@ FilterNotifier.on("filter.added", onFilterChange);
FilterNotifier.on("filter.removed", onFilterChange);
FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true));
FilterNotifier.on("load", onFilterChange);
+
+port.on("websocket-request", function(msg, sender)
+{
+ var results = ext.webRequest.onBeforeRequest._dispatch(
Sebastian Noack 2016/08/08 16:42:55 Nit: We prefer block scoping (i.e. "let") in modul
kzar 2016/08/08 18:19:06 Done.
+ new URL(msg.url),
+ "OTHER",
+ sender.page,
+ sender.frame
+ );
+ return results.indexOf(false) != -1;
+});
« include.preload.js ('K') | « include.preload.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld