Opened on 05/09/2014 at 09:37:16 AM

Closed on 05/22/2014 at 02:06:28 PM

Last modified on 05/23/2014 at 09:12:00 AM

#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@gmail.com, 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 on 05/09/2014 at 09:37:56 AM.
Element hiding filter not applied

Download all attachments as: .zip

Change History (11)

Changed on 05/09/2014 at 09:37:56 AM by Gingerbread Man

Element hiding filter not applied

comment:1 Changed on 05/09/2014 at 10:26:42 AM by mapx

  • Cc smultron45@gmail.com added

comment:2 Changed on 05/09/2014 at 03:44:39 PM by arthur

  • Ready set

comment:3 Changed on 05/09/2014 at 03:45:13 PM by arthur

  • Priority changed from Unknown to P4

comment:4 Changed on 05/09/2014 at 06:33:16 PM 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 on 05/10/2014 at 07:16:40 AM 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 on 05/12/2014 at 09:00:44 AM by philll

  • Cc arthur added

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

comment:7 Changed on 05/22/2014 at 02:06:28 PM 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 on 05/22/2014 at 04:38:22 PM 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 on 05/22/2014 at 04:52:55 PM 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 on 05/22/2014 at 04:53:45 PM by mapx

comment:10 in reply to: ↑ 8 Changed on 05/23/2014 at 09:12:00 AM 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.

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.