Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#573 closed defect (fixed)

Relative URLs aren't blocked in Safari

Reported by: sebastian Assignee: sebastian
Priority: P1 Milestone: Adblock-Plus-1.8.3-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: smultron45@… Blocked By:
Blocking: Platform:
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/6686166900277248/

Description

Environment

Safari 7

How to reproduce

Go to a website that uses relative URLs for resources that are supposed to be blocked.

For example: http://tvtotal.prosieben.de/tvtotal/videos/player/index.html?contentId=153848
Where following script is blocked by EasyList Germany: /tvtotal/includes/js/avt.js

Observed behaviour

Despite the filter ||prosieben.de^*/avt.js in Easy List Germany the scripts still loads and shows a preroll ad. That is because the code in the beforeload event handler assumes that the URL is always absolute, and ignores URLs that don't start with "http(s):".

Expected behaviour

Resources using relative URLs must also be blocked. Therefore the relative URL must be joined with the document's URL, to generate an absolute URL used for filter matching.

Change History (4)

comment:1 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 5 years ago by mapx

  • Cc smultron45@… added

comment:3 Changed 5 years ago by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:4 Changed 5 years ago by sebastian

  • Ready set
Note: See TracTickets for help on using tickets.