Opened on 01/07/2015 at 10:48:25 AM

Last modified on 01/24/2015 at 08:30:46 AM

#1759 new defect

ABP (android) blocks download of hosts-file list from hpHosts

Reported by: mapx Assignee:
Priority: Unknown Milestone:
Module: Adblock-Plus-for-Android Keywords:
Cc: Blocked By:
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Verified working:
Review URL(s):

Attachments (0)

Change History (2)

comment:1 Changed on 01/07/2015 at 10:49:23 AM by mapx

  • Description modified (diff)
  • Review URL(s) modified (diff)

comment:2 Changed on 01/24/2015 at 08:30:46 AM by lewisje

I recently decided to look through the ABP for Android source code and found something interesting: At this point, there is a series of regexes for guessing request types by filename, because as I expected, a local proxy server does not have the intimate knowledge of request types that an extension making full use of a browser API would have; this part of the code first checks the Accept header and then matches against the regexes.

The point is that some URLs, in some contexts, are treated very differently in ABP for Android vs. for Firefox or Chrome, and in particular there appears to be no exception for the top-level or URL bar request (a.k.a. the document), leading to problems like the blocking of an hpHosts URL by ABP for Android even though ABP for Firefox or Chrome would not block it.

In this particular case, the problem is that the hpHosts text file has a URL containing ad_servers: All URLs for downloading the file redirect to http://hosts-file.net/ad_servers.txt and that's problematic; a better idea would be to re-name the file and 301 redirect the old filename to the non-problematic one (maybe use Peter Lowe's idea and call it as.txt).

Add Comment

Modify Ticket

Change Properties
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from (none).
Next status will be 'reviewing'.
 
Note: See TracTickets for help on using tickets.