Bug 39089 - Domain names in Russian '.рф' domain are displayed as punycode
Summary: Domain names in Russian '.рф' domain are displayed as punycode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-05-13 14:45 PDT by Alexey Proskuryakov
Modified: 2010-05-13 15:43 PDT (History)
0 users

See Also:


Attachments
proposed fix (3.18 KB, patch)
2010-05-13 14:48 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2010-05-13 14:45:34 PDT
Steps to reproduce:
1. Open http://президент.рф

Expected results: address bar shows just this.
Actual results: it's converted to punycode.

There is no security risk in allowing Cyrillic characters in this TLD - to the contrary, Latin ones aren't allowed per registrar rules.

<rdar://problem/7974044>
Comment 1 Alexey Proskuryakov 2010-05-13 14:48:50 PDT
Created attachment 56027 [details]
proposed fix
Comment 2 Darin Adler 2010-05-13 15:03:09 PDT
Comment on attachment 56027 [details]
proposed fix

r=me

I'd like to see more use of early-return so the nesting could be a bit more shallow.

Also, we should find a way to make regression tests for this.
Comment 3 Alexey Proskuryakov 2010-05-13 15:33:56 PDT
Some examples of what needs to be tested:

shouldBe("presentDomainName('президент.рф')", "'президент.рф'");
shouldBe("presentDomainName('президент.рф.')", "'президент.рф.'");
shouldBe("presentDomainName('www.президент.рф')", "'www.президент.рф'");
shouldBe("presentDomainName('почта.президент.рф')", "'почта.президент.рф'");

shouldBe("presentDomainName('0ж9.рф')", "'0ж9.рф'");
shouldBe("presentDomainName('туда-сюда.рф')", "'туда-сюда.рф'");

shouldBe("presentDomainName('прeзидент.рф')", "'punycode'"); // spoof: Roman "e"
shouldBe("presentDomainName('caxap.рф')", "'punycode'"); // spoof: all characters in "caxap" are Roman
Comment 4 Alexey Proskuryakov 2010-05-13 15:43:10 PDT
Committed <http://trac.webkit.org/changeset/59391>.