Commit 4e4fec21 authored by Mustafa Emre Acer's avatar Mustafa Emre Acer Committed by Commit Bot

Block modifier-letter-voicing character from domain names

This character (ˬ) is easy to miss between other characters. It's one of the three characters from Spacing-Modifier-Letters block that ICU lists in its recommended set in uspoof.cpp. Two of these characters (modifier-letter-turned-comma and modifier-letter-apostrophe) are already blocked in crbug/678812.

Bug: 896717
Change-Id: I24b2b591de8cc7822cd55aa005b15676be91175e
Reviewed-on: https://chromium-review.googlesource.com/c/1303037
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604128}
parent 8444fc2d
......@@ -506,6 +506,10 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
// Block {Single,double}-quotation-mark look-alikes.
allowed_set.remove(0x2bbu); // Modifier Letter Turned Comma
allowed_set.remove(0x2bcu); // Modifier Letter Apostrophe
// Block modifier letter voicing.
allowed_set.remove(0x2ecu);
// No need to block U+144A (Canadian Syllabics West-Cree P) separately
// because it's blocked from mixing with other scripts including Latin.
......
......@@ -1013,7 +1013,11 @@ const IDNTestCase idn_cases[] = {
// Test that top domains whose skeletons are the same as the domain name are
// handled properly. In this case, tést.net should match test.net top
// domain.
{"xn--tst-bma.net", L"t\x00e9st.net", false}};
{"xn--tst-bma.net", L"t\x00e9st.net", false},
// Modifier-letter-voicing should be blocked (wwwˬtest.com).
{"xn--wwwtest-2be.com", L"www\x02ectest.com", false},
};
struct AdjustOffsetCase {
size_t input_offset;
......
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