Commit 8ac035c3 authored by Jungshik Shin's avatar Jungshik Shin Committed by Commit Bot

Add Lao/Thai spoofable entries


    U+0E1E (พ) => w
    U+0E9E (ພ) => w
    U+0E9F (ຟ) => w

    U+0EA3 (ຣ) => s
    U+0EAE (ຮ) => s

    U+0E1A (บ) => u
    U+0E9A (ບ) => u

    Note that U+0E1F(ฟ) and U+0E23 (ร) were added a while ago.

BUG=833143
TEST=components_unittests --gtest_filter=*IDN*

Change-Id: I882e7d272cdca1d80aa23be94b4d7906ff8653c1
Reviewed-on: https://chromium-review.googlesource.com/1058710Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562565}
parent 845b7cc7
......@@ -167,7 +167,8 @@ IDNSpoofChecker::IDNSpoofChecker() {
// U+0525 and U+0153.
// - {U+0167 (ŧ), U+0442 (т), U+04AD (ҭ), U+050F (ԏ)} => t
// - {U+0185 (ƅ), U+044C (ь), U+048D (ҍ), U+0432 (в)} => b
// - {U+03C9 (ω), U+0448 (ш), U+0449 (щ), U+0E1F (ฟ)} => w
// - {U+03C9 (ω), U+0448 (ш), U+0449 (щ), U+0E1E (พ),
// U+0E1F (ฟ), U+0E9E (ພ), U+0E9F (ຟ)} => w
// - {U+043C (м), U+04CE (ӎ)} => m
// - {U+0454 (є), U+04BD (ҽ), U+04BF (ҿ), U+1054 (ၔ)} => e
// - U+0491 (ґ) => r
......@@ -177,19 +178,20 @@ IDNSpoofChecker::IDNSpoofChecker() {
// - U+03C7 (χ), U+04B3 (ҳ), U+04FD (ӽ), U+04FF (ӿ) => x
// - U+0503 (ԃ) => d
// - {U+050D (ԍ), U+100c (ဌ)} => g
// - {U+0D1F (ട), U+0E23 (ร)} => s
// - {U+0D1F (ട), U+0E23 (ร), U+0EA3 (ຣ), U+0EAE (ຮ)} => s
// - U+1042 (၂) => j
// - {U+0437 (з), U+0499 (ҙ), U+04E1 (ӡ)} => 3
// - {U+0E1A (บ), U+0E9A (ບ)} => u
extra_confusable_mapper_.reset(icu::Transliterator::createFromRules(
UNICODE_STRING_SIMPLE("ExtraConf"),
icu::UnicodeString::fromUTF8(
"[æӕ] > ae; [þϼҏ] > p; [ħнћңҥӈӊԋԧԩ] > h;"
"[ĸκкқҝҟҡӄԟ] > k; [ŋпԥ] > n; œ > ce;"
"[ŧтҭԏ] > t; [ƅьҍв] > b; [ωшщ] > w;"
"[ŧтҭԏ] > t; [ƅьҍв] > b; [ωшщพฟພຟ] > w;"
"[мӎ] > m; [єҽҿၔ] > e; ґ > r; [ғӻ] > f;"
"[ҫင] > c; ұ > y; [χҳӽӿ] > x;"
"ԃ > d; [ԍဌ] > g; [ടร] > s; ၂ > j;"
"[зҙӡ] > 3"),
"ԃ > d; [ԍဌ] > g; [ടรຣຮ] > s; ၂ > j;"
"[зҙӡ] > 3; [บບ] > u"),
UTRANS_FORWARD, parse_error, status));
DCHECK(U_SUCCESS(status))
<< "Spoofchecker initalization failed due to an error: "
......
......@@ -17,6 +17,8 @@ ld.com
1gd.com
cegjo.com
wsws.com
wsu.com
wsou.com
1234567890.com
aece.com
aen.com
......@@ -27,6 +27,8 @@ ld.corn, 1
lgd.corn, 1
cegjo.corn, 1
wsws.corn, 1
wsu.corn, 1
wsou.corn, 1
l23456789O.corn, 1
aece.corn, 1
aen.corn, 1
......
......@@ -557,6 +557,20 @@ const IDNTestCase idn_cases[] = {
// ฟรฟร.com (made of two Thai characters. similar to wsws.com in
// some fonts)
{"xn--w3calb.com", L"\x0e1f\x0e23\x0e1f\x0e23.com", false},
// พรบ.com
{"xn--r3chp.com", L"\x0e1e\x0e23\x0e1a.com", false},
// ฟรบ.com
{"xn--r3cjm.com", L"\x0e1f\x0e23\x0e1a.com", false},
// Lao characters that look like w, s, o, and u.
// ພຣບ.com
{"xn--f7chp.com", L"\x0e9e\x0ea3\x0e9a.com", false},
// ຟຣບ.com
{"xn--f7cjm.com", L"\x0e9f\x0ea3\x0e9a.com", false},
// ຟຮບ.com
{"xn--f7cj9b.com", L"\x0e9f\x0eae\x0e9a.com", false},
// ຟຮ໐ບ.com
{"xn--f7cj9b5h.com", L"\x0e9f\x0eae" L"\x0ed0\x0e9a.com", false},
// At one point the skeleton of 'w' was 'vv', ensure that
// that it's treated as 'w'.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment