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: Don't hardcode connection state values Created Aug. 10, 2016, 4:25 p.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 | « include.preload.js ('k') | safari/include.youtube.js » ('j') | 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..0a00879af8dbd3e8af66b82bd11b2b8ae0db5a98 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,13 @@ 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)
+{
+ return ext.webRequest.onBeforeRequest._dispatch(
+ new URL(msg.url),
+ "OTHER",
+ sender.page,
+ sender.frame
+ ).indexOf(false) != -1;
+});
« no previous file with comments | « include.preload.js ('k') | safari/include.youtube.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld