Opened on 08/12/2016 at 12:25:13 PM

Closed on 08/12/2016 at 03:08:29 PM

Last modified on 08/16/2016 at 09:11:54 AM

#4326 closed defect (fixed)

[abp2blocklist] || doesn't match additional subdomains

Reported by: kzar Assignee: kzar
Priority: P2 Milestone: Adblock-Plus-1.12.2-for-Chrome-Opera-Safari
Module: Platform Keywords: abp2blocklist, AcceptableAds
Cc: sebastian, mario Blocked By:
Blocking: #4321 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://issues.adblockplus.org/ticket/4326

Description (last modified by sebastian)

How to reproduce

Run echo '||example.com' | node abp2blocklist.js

Observed behaviour

Following rule is generated:

[
	{
		"trigger": {
			"url-filter": "^https?://example\\.com",
			"url-filter-is-case-sensitive": true,
			"resource-type": [
				"image",
				"style-sheet",
				"script",
				"font",
				"media",
				"raw",
				"document"
			]
		},
		"action": {
			"type": "block"
		}
	}
]

Expected behaviour

The || token does not only represent the protocol part but also any additional subdomain. So for example in Adblock Plus for Firefox and Chrome, ||example.com matches any of those: http://example.com, https://www.example.com, https://a.b.c.example.com. In order to achieve the same behavior with Content Blockers, the url-filter has to look like "^https?://([^/]+\\.)?example.com".

Notes

This bug broke Acceptable Ads on some websites in Adblock Plus for iOS, see #4282 for the related quick fix.

Attachments (0)

Change History (10)

comment:1 Changed on 08/12/2016 at 01:21:54 PM by kzar

  • Blocking 4321 added

comment:2 Changed on 08/12/2016 at 01:25:10 PM by sebastian

  • Description modified (diff)
  • Type changed from change to defect

comment:3 Changed on 08/12/2016 at 01:34:28 PM by sebastian

  • Description modified (diff)

comment:4 Changed on 08/12/2016 at 01:36:56 PM by sebastian

  • Summary changed from [abp2blocklist] Include www subdomain in the URL filter for request exception rules to [abp2blocklist] || doesn't match addional subdomains

comment:5 Changed on 08/12/2016 at 01:41:17 PM by sebastian

  • Summary changed from [abp2blocklist] || doesn't match addional subdomains to [abp2blocklist] || doesn't match additional subdomains

comment:6 Changed on 08/12/2016 at 03:07:49 PM by abpbot

A commit referencing this issue has landed:
Issue 4326 - || should match subdomains too

comment:7 Changed on 08/12/2016 at 03:08:29 PM by kzar

  • Resolution set to fixed
  • Review URL(s) modified (diff)
  • Status changed from new to closed

comment:8 Changed on 08/12/2016 at 03:25:59 PM by abpbot

comment:9 Changed on 08/12/2016 at 03:27:00 PM by sebastian

  • Milestone set to Adblock-Plus-1.12.2-for-Chrome-Opera-Safari

comment:10 Changed on 08/16/2016 at 09:11:54 AM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Generates the url-filter described above.

abp2blocklist / 40:c2c40f08f9ce

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 kzar.
 
Note: See TracTickets for help on using tickets.