[Fixed] Domain with a trailing dot: hiding rules won't apply

Posting here is no longer possible, please use the corresponding product forum.

[Fixed] Domain with a trailing dot: hiding rules won't apply

Postby famlam » Sat Feb 11, 2012 9:48 pm

Hi,

Not a very big bug as I doubt anyone will use trailing-dot-domain URLs, but worth mentioning:
If you visit http://torrentz.eu./ (or any random http URL and just append a dot to the domain) the following bugs can be found:
1. the EHH suggests the domain ""
2. the generated domain-specific filter from the EHH (foo.bar.##anything) won't apply to the page, (neither will foo.bar##anything).

Kind regards,
Famlam
famlam
 
Posts: 59
Joined: Sat Aug 07, 2010 2:06 pm

Re: Domains with a trailing dot: hiding rules won't apply

Postby Wladimir Palant » Mon Feb 13, 2012 11:37 pm

The correct rule would be indeed "foo.bar.##anything" - Gecko treats "foo.bar." and "foo.bar" as different domains.

Now there are apparently two issues in how we are handling this domain name, will look into it.
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany


Re: [Fixed] Domain with a trailing dot: hiding rules won't apply

Postby famlam » Sat Jun 23, 2012 4:07 pm

Thanks!

FYI, from your patch (line 1.87):
Code: Select all
if (this.ignoreTrailingDot)
  docDomain = docDomain.replace(/\.+$/, "").toUpperCase();
docDomain = docDomain.toUpperCase();


Shouldn't that be
Code: Select all
if (this.ignoreTrailingDot)
  docDomain = docDomain.replace(/\.+$/, "");
docDomain = docDomain.toUpperCase();
as you are uppercasing twice?
famlam
 
Posts: 59
Joined: Sat Aug 07, 2010 2:06 pm

Re: [Fixed] Domain with a trailing dot: hiding rules won't apply

Postby Wladimir Palant » Sat Jun 23, 2012 4:59 pm

You are correct, thanks for noticing!

Fixed: https://hg.adblockplus.org/adblockplus/rev/db19b081bd9c
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany


Return to Bug reports

Who is online

Users browsing this forum: Vincentavemi and 12 guests