Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#454 closed defect (incomplete)

Invalid / malformed filters shouldn't affect the processing of valid filters

Reported by: Gingerbread Man Assignee:
Priority: P4 Milestone:
Module: Adblock-Plus-for-Firefox Keywords:
Cc: smultron45@…, arthur, trev Blocked By:
Blocking: Platform:
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by Gingerbread Man)

Environment

Me: Firefox 31.0a2 (2014-05-08) • Adblock Plus 2.6.0.3810
Reporter: Firefox 30.0b2 • Adblock Plus 2.6.0.3807
https://adblockplus.org/forum/viewtopic.php?f=1&t=22999

How to reproduce

  1. Starting with a fresh profile and a new installation of Adblock Plus, go to the all subscriptions page and add the ROList subscription.
  2. In the Filter Preferences window - Filter Subscriptions tab, uncheck "Allow some non-intrusive advertising", then check "Adblock Warning Removal List".
  3. On the Custom Filters tab, add the following filter (suggested by EHH when trying to hide the adblock warning): mangastream.com##.pull-right.message-ld
  4. Open the Blockable Items Pane.
  5. Go to http://mangastream.com
  6. The adblock warning shows next to the logo in the top left. The blockable items pane doesn't show the custom filter being applied. The filter preferences window shows zero hits for the filter.
  7. In the Filter Preferences window - Filter Subscriptions tab, uncheck "Adblock Warning Removal List", then uncheck "ROList". As soon as you do, the adblock warning message disappears.
  8. Re-enable "Adblock Warning Removal List", then re-enable "ROList".
  9. The adblock warning stays gone. On a page reload, the blockable items pane shows the filter being applied and the filter preferences window shows 2 hits on the filter. The issue doesn't show up again after that, even after clearing the cache, cookies and offline website data.

As noted at comment 4, this is due to the following malformed filters in ROList:

bancuri.ro##.art-blockcontent-body A > IMG and ||ne-jucam.net/maimutica.swf
distanta.ro##DIV[style$="width: 336px; height: 280px;�]
distanta.ro##DIV[style*="display: block; background-color: white; �]

Observed behavior

The adblock warning shows next to the logo in the top left. The blockable items pane doesn't show the custom filter being applied. The filter preferences window shows zero hits for the filter.

Expected behavior

The adblock warning next to the logo in the top left shouldn't be visible. The blockable items pane should show show the custom filter being applied. The filter preferences window should show 2 hits for the filter.

Attachments (1)

elementhidingnotapplied.png (98.0 KB) - added by Gingerbread Man 5 years ago.
Element hiding filter not applied

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by Gingerbread Man

Element hiding filter not applied

comment:1 Changed 5 years ago by mapx

  • Cc smultron45@… added

comment:2 Changed 5 years ago by arthur

  • Ready set

comment:3 Changed 5 years ago by arthur

  • Priority changed from Unknown to P4

comment:4 Changed 5 years ago by barbaz

Most likely not an Adblock Plus issue, but rather these three bad hiding filters in ROList

bancuri.ro##.art-blockcontent-body A > IMG and ||ne-jucam.net/maimutica.swf
distanta.ro##DIV[style$="width: 336px; height: 280px;�]
distanta.ro##DIV[style*="display: block; background-color: white; �]

comment:5 Changed 5 years ago by Gingerbread Man

  • Description modified (diff)
  • Summary changed from Element hiding filter is not applied to Invalid / malformed filters shouldn't affect the processing of valid filters

comment:6 Changed 5 years ago by philll

  • Cc arthur added

@arthur: please reevaluate due to https://issues.adblockplus.org/ticket/454#comment:4

comment:7 Changed 5 years ago by arthur

  • Resolution set to invalid
  • Status changed from new to closed

The maintainer fixed the filters and it's no longer happening.

comment:8 follow-up: Changed 5 years ago by Gingerbread Man

Invalid reads like a bad joke. "There's a filter problem" wasn't the report.

This isn't the first time this has happened, and it won't be the last. If you considered it not worth the time and effort, it would've at least made some sense if this was marked wontfix.

comment:9 Changed 5 years ago by mapx

It's strange indeed. It seems that one bad filter could affect all the other filters (or subscriptions !) or the process of blocking / hiding the ads. So, a bad filter should be only ignored.

Last edited 5 years ago by mapx (previous) (diff)

comment:10 in reply to: ↑ 8 Changed 5 years ago by trev

  • Cc trev added

Replying to Gingerbread Man:

Invalid reads like a bad joke. "There's a filter problem" wasn't the report.

The way element hiding is implemented in Firefox, preventing side-effects of bad filters isn't really possible. Also, we cannot validate each rule - there are simply too many of them, that would waste too much time even if validating on download (which wouldn't really be sufficient, whether a particular rule is valid or not depends on the Firefox version among other things). The current approach is making sure that an appropriate message shows up in the Browser Console. Also, #493 and #494 should make is far less likely that invalid filters even make it into the lists.

So it's either rejected or duplicate - pick whichever resolution you prefer.

Note: See TracTickets for help on using tickets.