From f65d44ba4707f09ce1022aecbdc98a943d97c9a4 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 24 Feb 2015 20:27:47 -0500 Subject: [PATCH] this fixes #840 --- src/js/dynamic-net-filtering.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/dynamic-net-filtering.js b/src/js/dynamic-net-filtering.js index 0da5f4755..312cb322c 100644 --- a/src/js/dynamic-net-filtering.js +++ b/src/js/dynamic-net-filtering.js @@ -521,6 +521,12 @@ Matrix.prototype.fromString = function(text, append) { continue; } + // https://github.com/gorhill/uBlock/issues/840 + // Discard invalid rules + if ( desHostname !== '*' && type !== '*' ) { + continue; + } + action = nameToActionMap[fields[3]]; if ( typeof action !== 'number' || action < 0 || action > 3 ) { continue;