Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#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.

Change History (10)

comment:1 Changed 3 years ago by kzar

  • Blocking 4321 added

comment:2 Changed 3 years ago by sebastian

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

comment:3 Changed 3 years ago by sebastian

  • Description modified (diff)

comment:4 Changed 3 years ago 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 3 years ago by sebastian

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

comment:6 Changed 3 years ago by abpbot

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

comment:7 Changed 3 years ago by kzar

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

comment:8 Changed 3 years ago by abpbot

comment:9 Changed 3 years ago by sebastian

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

comment:10 Changed 3 years ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Generates the url-filter described above.

abp2blocklist / 40:c2c40f08f9ce

Note: See TracTickets for help on using tickets.