mirror of https://github.com/gorhill/uBlock.git
Prevent reverse-lookup from finding badfilter-ed filters
This could occur when clicking old entries in the logger which no longer matched the internal state of uBO. Related feedback: - https://github.com/MajkiIT/polish-ads-filter/issues/14768#issuecomment-536006312
This commit is contained in:
parent
23b6f35893
commit
e1d75ee602
|
@ -49,6 +49,9 @@ const extractBlocks = function(content, begId, endId) {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
// https://github.com/MajkiIT/polish-ads-filter/issues/14768#issuecomment-536006312
|
||||
// Avoid reporting badfilter-ed filters.
|
||||
|
||||
const fromNetFilter = function(details) {
|
||||
const lists = [];
|
||||
const compiledFilter = details.compiledFilter;
|
||||
|
@ -56,7 +59,7 @@ const fromNetFilter = function(details) {
|
|||
for ( const assetKey in listEntries ) {
|
||||
const entry = listEntries[assetKey];
|
||||
if ( entry === undefined ) { continue; }
|
||||
const content = extractBlocks(entry.content, 0, 1000);
|
||||
const content = extractBlocks(entry.content, 0, 0);
|
||||
let pos = 0;
|
||||
for (;;) {
|
||||
pos = content.indexOf(compiledFilter, pos);
|
||||
|
|
Loading…
Reference in New Issue