From 6450afefdad2f570a5a1e022fee33f2775cf2222 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 23 Mar 2015 19:47:41 -0400 Subject: [PATCH] oops, `*` is a valid hostname placeholder --- src/js/dynamic-net-filtering.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/dynamic-net-filtering.js b/src/js/dynamic-net-filtering.js index d22e714db..dcace3433 100644 --- a/src/js/dynamic-net-filtering.js +++ b/src/js/dynamic-net-filtering.js @@ -542,7 +542,9 @@ Matrix.prototype.fromString = function(text, append) { // https://github.com/gorhill/uBlock/issues/1082 // Discard rules with invalid hostnames - if ( reBadHostname.test(srcHostname) || reBadHostname.test(desHostname) ) { + if ( (srcHostname !== '*' && reBadHostname.test(srcHostname)) || + (desHostname !== '*' && reBadHostname.test(desHostname)) + ) { continue; }