same domain rules don't block images

Bug #1069294 reported by cristian
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Midori Web Browser
Confirmed
High
Unassigned

Bug Description

When I use adblock extension, I select 'Block image' and I edit the rule for blocking all the images with the same file extension in a specific web domain (i.e. http://www.mysite.org/*png).

But if I add two rules about the same web domain (i.e. http://www.mysite.org/*png and http://www.mysite.org/*jpg), the second rule is ignored (if I reverse the two lines, http://www.mysite.org/*png is ignored instead).

This happens both rules are in the custom.list file than the rules are in a txt custom filter.

Tags: adblock

Related branches

Revision history for this message
cristian (cristiancozzolino) wrote :

The vug occurs, as well as on midori 0.4.3, also on midori 0.4.7.

Revision history for this message
gue5t gue5t (gue5t) wrote :

I was able to reproduce this with <http://forum.ubuntu-it.org/> as the domain. I'm not sure exactly what the cause is.

Changed in midori:
status: New → Confirmed
Revision history for this message
Cris Dywan (kalikiana) wrote :

It would be nice to reproduce this in a unit test, to be able to solve it.

summary: - [adblock] more rules about same web domain don't block images
+ same domain rules don't block images
Revision history for this message
cristian (cristiancozzolino) wrote :

I created a unit test for this extension and I've tested the bug with it. Result: the bug is confirmed.

Revision history for this message
Cris Dywan (kalikiana) wrote :

ERROR:../extensions/adblock.c:1930:test_same_domain: assertion failed: (adblock_is_matched ("http://forum.ubuntu-it.org/download/file.php?avatar=95802_1334865145.png", ""))

Nice test case. I suspect adblock_is_matched_by_pattern or adblock_is_matched_by_key is likely the cause for the error. Cristian, are you interested in continuing to solve the bug?

Changed in midori:
status: Confirmed → In Progress
Revision history for this message
cristian (cristiancozzolino) wrote :

«Cristian, are you interested in continuing to solve the bug?»
Sure. What have I to do?

Revision history for this message
Cris Dywan (kalikiana) wrote :

So what's the current state of this? Still in progress?

Changed in midori:
status: In Progress → Confirmed
Revision history for this message
Danielle Foré (danrabbit) wrote :

Converted unit test patch into bzr branch and proposed for merge lp:~midori/midori/adblock-unit-test

Removing patch from thread

Revision history for this message
cristian (cristiancozzolino) wrote :

I've tried Midori 0.5.0 and the bug is confirmed.

Cody Garver (codygarver)
Changed in midori:
milestone: none → 0.5.4
Cris Dywan (kalikiana)
Changed in midori:
milestone: 0.5.4-freeze → 0.5.5
importance: Undecided → High
Cris Dywan (kalikiana)
Changed in midori:
milestone: 0.5.5-freeze → 0.5.6
Donte Greene (flykidd)
Changed in midori:
status: Confirmed → In Progress
status: In Progress → Confirmed
Cris Dywan (kalikiana)
Changed in midori:
milestone: 0.5.6 → 0.5.7
Cris Dywan (kalikiana)
Changed in midori:
milestone: 0.5.7 → garage
Changed in midori:
milestone: garage → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.