Fix mixing hostname and entity in `domain=` option

Reported internally.

Related commit:
- 3c67d2b89f
This commit is contained in:
Raymond Hill 2020-05-25 07:02:49 -04:00
parent b2d0e95b4f
commit 8310e91e0e
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 2 additions and 2 deletions

View File

@ -1188,7 +1188,7 @@ const filterOrigin = (( ) => {
compiledHit.push(FilterOriginHitSet.compile(hostnameHits.join('|'))); compiledHit.push(FilterOriginHitSet.compile(hostnameHits.join('|')));
} }
if ( compiledHit.length > 1 ) { if ( compiledHit.length > 1 ) {
compiledHit[0] = [ FilterCompositeAny.compile(compiledHit.slice()) ]; compiledHit[0] = FilterCompositeAny.compile(compiledHit.slice());
compiledHit.length = 1; compiledHit.length = 1;
} }
const compiledMiss = []; const compiledMiss = [];
@ -1804,7 +1804,7 @@ const FilterDenyAllow = class {
static fromCompiled(args) { static fromCompiled(args) {
const f = new FilterDenyAllow(args[1]); const f = new FilterDenyAllow(args[1]);
for ( const hn of args[1].split('|') ) { for ( const hn of FilterParser.domainOptIterator(args[1]) ) {
if ( hn === '' ) { continue; } if ( hn === '' ) { continue; }
f.hndict.add(hn); f.hndict.add(hn);
} }