Fix entity-based lookup in html & scriptlet filtering

Entity-based filters where not properly looked-up if
they used subdomains. Example:

- `example.*##^script` => ok

- `www.example.*##^script` => failed on `https://www.example.com/`
This commit is contained in:
Raymond Hill 2019-09-10 10:51:34 -04:00
parent ed94692238
commit a73dd0a9f2
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 2 additions and 2 deletions

View File

@ -356,7 +356,7 @@
);
if ( details.entity !== '' ) {
filterDB.retrieve(
`${hostname.slice(0, -details.domain)}${details.entity}`,
`${hostname.slice(0, -details.domain.length)}${details.entity}`,
[ plains, exceptions, procedurals, exceptions ]
);
}

View File

@ -369,7 +369,7 @@
);
if ( request.entity !== '' ) {
scriptletDB.retrieve(
`${hostname.slice(0, -request.domain)}${request.entity}`,
`${hostname.slice(0, -request.domain.length)}${request.entity}`,
[ scriptlets, exceptions ]
);
}