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

View file

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