Opened 7 months ago

Closed 7 months ago

Last modified 2 months ago

#7312 closed defect (fixed)

Specific-only flag does not work for non-simple filters

Reported by: mjethani Assignee: mjethani
Priority: P2 Milestone:
Module: Core Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/30018560/

Description

Environment

adblockpluscore changeset 33ad12603619

How to reproduce

Run the following JS script from the root directory of the repo:

let {CombinedMatcher} = require("./lib/matcher");
let {Filter} = require("./lib/filterClasses");

let matcher = new CombinedMatcher();
matcher.add(Filter.fromText("^foo/bar/$script"));
console.log(matcher.matchesAny("http://foo/bar/", 0xFFFFFF, "example.com",
                               false, null, true));

Observed behaviour

Prints the filter ^foo/bar/$script

Expected behaviour

Should print null because the filter is generic and we have passed the specific-only flag (last argument) to matchesAny().

Notes

This is a regression from #7267.

Change History (5)

comment:1 Changed 7 months ago by mjethani

  • Owner set to mjethani

comment:2 Changed 7 months ago by mjethani

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 7 months ago by abpbot

comment:4 Changed 7 months ago by mjethani

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:5 Changed 2 months ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Done. Working as described (#7265)

ABP 0.9.15.2340
Microsoft Edge 44.17763.1.0 / Windows 10 1809

ABP 3.5.2.2340
Chrome 49.0.2623.75 / Windows 10 1809
Chrome 75.0.3770.142 / Windows 10 1809
Opera 36.0.2130.65 / Windows 10 1809
Opera 62.0.3331.72 / Windows 10 1809
Firefox 51.0 / Windows 10 1809
Firefox 68.0 / Windows 10 1809
Firefox Mobile 68.0 / Android 7.2.2

Note: See TracTickets for help on using tickets.