Opened 3 years ago

Last modified 4 weeks ago

#4280 reopened defect

Safari "page's address isn't valid" error when using the content blocking API — at Version 6

Reported by: scheer Assignee: kzar
Priority: P1 Milestone:
Module: Adblock-Plus-for-iOS/macOS Keywords: AcceptableAds
Cc: mario, kzar, Ross, scheer, CraftyDeano, amrmak Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29349794/
https://codereview.adblockplus.org/29354751/
https://codereview.adblockplus.org/29370756/

Description (last modified by kzar)

Environment

iPhone 6s Plus
iOS 9.3.1
ABP iOS 1.1.0

OR

Safari 9.1 for Mac OS X
An otherwise empty extension that uses this Content Blocker File:

[
	{
		"trigger": {
			"url-filter": "^https?://.*&advid=",
			"resource-type": [
				"image",
				"style-sheet",
				"script",
				"font",
				"media",
				"raw",
				"document"
			]
		},
		"action": {
			"type": "block"
		}
	}
]

How to reproduce

  1. Visit https://www.google.co.uk/aclk?sa=L&ai=DChcSEwjC6rqt5p_OAhVGuBsKHUoeAG8YABAA&sig=AOD64_2kAoVInCmwfi5kot9P5h-jb1GQ7Q&q=&ved=0ahUKEwjA-bet5p_OAhVlBcAKHVU4CDMQ0QwIIQ&adurl=

OR

  1. Visit https://www.google.de and search 'Samsung Galaxy S7'
  2. Select the Ad with the URL 'www.base.de/galaxy-s7'

OR

  1. Visit https://au.search.yahoo.com and search 'buy car'
  2. Select the ad 'www.AMSVans.com'

Observed behaviour

On iOS this error message is displayed: Safari cannot open the page 'The Error was. 'The URL can't be shown'.

For Safari 9.1 on Mac OS X this message is displayed: "Safari can't open the page "​https://www.google.co.uk/aclick?..." because the page's address isn't valid".

Expected behaviour

No error message displayed, browser is redirected to the advertisement.

Notes

  • Safari 9.1 considers the URL invalid both before and after the recent #3050 hotfix to the blocking rules.
  • Safari 9.1 does not consider the URL invalid when no content blocking extension is installed.
  • Safari 9.1 does not consider the URL invalid when a content blocking extension with only one rule is installed.
  • This appears to be a Safari bug related to the content blocking API.
  • While the bug can be triggered with a content blocker file with only one rule, the problem is not resolved by removing that rule from easylist+exceptionrules_content_blocker.json. (In other words the problem can be triggered by multiple rules in our file. I haven't found a pattern yet however.)

Change History (8)

Changed 3 years ago by scheer

comment:1 Changed 3 years ago by scheer

Whilst testing, I also used the same search criteria on www.yahoo.co.uk for 'buy car'. When selecting the ad link for www.nissan.co.uk/car, the advertised URL loads correctly.

comment:2 Changed 3 years ago by scheer

bing.com also works correctly with the above mentioned URL's.

comment:3 Changed 3 years ago by scheer

  • Description modified (diff)

comment:4 Changed 3 years ago by kzar

  • Cc mario added
  • Description modified (diff)
  • Owner set to kzar
  • Platform changed from iOS to Unknown / Cross platform
  • Priority changed from Unknown to P1
  • Ready set
  • Summary changed from 'URL can't be shown' when selecting a particular ad-link from Google search results in ABP iOS to Safari "page's address isn't valid" error when using the content blocking API

This looks like it could be a Safari bug, but before we continue I want to try to figure out which rules trigger the problem.

comment:5 Changed 3 years ago by kzar

  • Description modified (diff)

comment:6 Changed 3 years ago by kzar

  • Description modified (diff)

Changed 3 years ago by kzar

Note: See TracTickets for help on using tickets.