Opened 3 years ago

Last modified 3 months ago

#4302 reopened defect

^ doesn't match URL with a dot after domain name

Reported by: Lain_13 Assignee:
Priority: Unknown Milestone:
Module: Core Keywords:
Cc: kzar, sebastian, mapx, fanboy, segz Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by mjethani)

Environment

Google Chrome 52.0.2743.82 m
Adblock Plus development build 1.12.1.1627

How to reproduce

  1. Create test page which loads resource like this:

http://gogame3.game-rust.ru./55t81h7fiaj7surb1af3va6bkgpocrw4050uc2xf0h0c507pscxrkm23u0qo?3ubo8ums=ea8c

  1. Add filter:
    .game-rust.ru^$script
    

Observed behaviour

Resource is not blocked because ^ doesn't match the dot at the end.

Expected behaviour

should match "./" combo to avoid creating duplicate filters like:

.game-rust.ru.^$script

Change History (20)

comment:1 Changed 3 years ago by Lain_13

Could someone please fix ^? I haven't noticed it's effect before it were too late and now I can't edit.

comment:2 Changed 3 years ago by mapx

  • Description modified (diff)

comment:3 Changed 3 years ago by mapx

  • Description modified (diff)

comment:4 Changed 3 years ago by mapx

  • Description modified (diff)

comment:5 Changed 3 years ago by Lain_13

Also, I've missed $ between ^ and script

comment:6 Changed 3 years ago by mapx

  • Description modified (diff)

comment:7 Changed 3 years ago by Lain_13

Live example here: http://kinoprofi.net/
Look for the script: http://psma01.com./js/sys.js

comment:8 Changed 3 years ago by mapx

  • Cc kzar sebastian mapx added

comment:9 Changed 3 years ago by kzar

  • Cc trev added
  • Component changed from Unknown to Core

(Since this behaviour is consistent with the Firefox extension I guess this is a core issue.)

comment:10 Changed 3 years ago by trev

Thing is: gogame3.game-rust.ru and gogame3.game-rust.ru. aren't the same thing. Technically, it is really two different host names and the content isn't required to be identical. So I'd argue that the current behavior is correct - if both gogame3.game-rust.ru and gogame3.game-rust.ru. need to be covered then two separate filters are necessary. Having ^ accept both would be unexpected behavior...

comment:11 Changed 3 years ago by Lain_13

I'm not so sure: http://www.dns-sd.org/trailingdotsindomainnames.html
Is there an example when content with and without dot is different? As I understand version with the dot is just a FQDN and without one - relatively qualified, but dot added internally later on anyway.

Last edited 3 years ago by Lain_13 (previous) (diff)

comment:12 Changed 3 years ago by trev

As far as DNS is concerned they are the same. Web servers and browsers treat them as different entities however.

comment:13 Changed 3 years ago by Lain_13

Well, this trailing dot is mostly used to avoid blocking and I haven't seen even one case yet when it were used for something different. So, I think it shouldn't be a big deal to add two filters (||domain.name: and ||doman.name/) to avoid blocking of the ||domain.name./ if we ever encounter a situation when they should be treated separately.

Also, it's not possible to register a domain name with the dot in the end, same as an existing one. So, anyway that dot will be processed by the same server and since we are mostly using ||domain.name^ syntax to block ad servers completely then why should we intentionally leave them a way to serve their content only to block it later on with an extra filter?

Last edited 3 years ago by Lain_13 (previous) (diff)

comment:14 Changed 3 years ago by mapx

  • Cc fanboy added

comment:15 Changed 18 months ago by fhd

  • Cc trev removed

comment:16 Changed 18 months ago by sergz

  • Cc segz added

comment:17 Changed 3 months ago by mjethani

This was fixed in #6690. I am closing this.

comment:18 Changed 3 months ago by mjethani

  • Resolution set to duplicate
  • Status changed from new to closed

comment:19 Changed 3 months ago by mjethani

  • Description modified (diff)

comment:20 Changed 3 months ago by mjethani

  • Description modified (diff)
  • Resolution duplicate deleted
  • Status changed from closed to reopened

Sorry, I made a mistake. #6690 is about the hostname of the document making the request, not the hostname part of the request URL. This indeed does not work.

Note: See TracTickets for help on using tickets.