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;