Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1801 closed defect (fixed)

Internationalized domains (IDN) aren't handled correctly

Reported by: Lain_13 Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.8.11-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: mapx Blocked By: #1841
Blocking: #154, #1853 Platform: Chrome
Ready: yes Confidential: no
Tester: Verified working:
Review URL(s):

http://codereview.adblockplus.org/5564089086509056

Description

Environment

OS: Windows 7 Ultimate SP1
Chrome: Version 39.0.2171.95 m
Adblock Plus: 1.8.9
Lists (doesn't matter): EasyList + RU Adlists + Anticounter and Bitblock from RU Adlist site.

How to reproduce

  1. Try to visit site http://нашбийск.рф/ or http://xn--80acvefn6a4c.xn--p1ai/ (will change to the previous one) with following two filters:

нашбийск.рф##.infiniteCarousel
/images/banners/*$domain=нашбийск.рф

  1. Now add following two filters and try again:

xn--80acvefn6a4c.xn--p1ai##.infiniteCarousel
/images/banners/*$domain=xn--80acvefn6a4c.xn--p1ai

Observed behaviour

In first case all banners remains visible, in seconds case banners are blocked or hidden.

Expected behaviour

First set of hiding rules should be enough and they have to work as-is.
Otherwise it will be necessary to maintain two sets of hiding and blocking rules for such domains since second case doesn't work in Firefox.

Change History (9)

comment:1 Changed 5 years ago by mapx

  • Cc mapx sebastian added

comment:2 Changed 5 years ago by sebastian

  • Component changed from Unknown to Platform
  • Priority changed from Unknown to P3
  • Ready set

This is because Chrome preserves the punycode encoding of domains, while Firefox seems to support IDN on the API level transparently decoding domains. In order to have the same behavior on Chrome as we have on Firefox, we would need to decode domains processed by Adblock Plus. Therefore URL objects in combination with IDN-aware helper functions decoding the hostname.

Last edited 5 years ago by sebastian (previous) (diff)

comment:3 Changed 5 years ago by sebastian

  • Cc sebastian removed
  • Owner set to sebastian

comment:4 Changed 5 years ago by sebastian

  • Blocked By 1841 added

comment:5 Changed 5 years ago by sebastian

  • Blocking 1853 added

comment:6 Changed 5 years ago by sebastian

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

comment:7 Changed 5 years ago by sebastian

  • Blocking 154 added

comment:8 Changed 5 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:9 Changed 5 years ago by sebastian

  • Summary changed from Domain-bound hiding and blocking rules doesn't work for localized domain names in Chrome to Internationalized domains (IDN) aren't handled correctly
Note: See TracTickets for help on using tickets.