spoof english leaks via numberingSystem: numbers (non-latn) or decimal separator (latn)
we only currently have three (locale, numberingSystem): ar (arab), fa (arabext) and my (mymr)
PREREQ
- see this: https://searchfox.org/mozilla-central/source/dom/locales/en-US/chrome/dom/dom.properties
- note some validations have
$S
to pass values (like dates and numbers) - test: https://arkenfox.github.io/TZP/tests/applang.html
- it's also built into TZP (https://arkenfox.github.io/TZP/tzp.html#region) where you get health checks
- note: both pages do not set a language in the html tag
- get an en-US default hash/strings [1]
[1] for reference, this is en-US
DOCUMENT: validation_messages: ca1379a9
{
"BadInputNumber": "Please enter a number.",
"CheckboxMissing": "Please check this box if you want to proceed.",
"DateTimeRangeOverflow": "Please select a value that is no later than 2023-12-31.",
"DateTimeRangeUnderflow": "Please select a value that is no earlier than 2023-12-31.",
"FileMissing": "Please select a file.",
"InvalidEmail": "Please enter an email address.",
"InvalidURL": "Please enter a URL.",
"NumberRangeOverflow": "Please select a value that is no more than 2.",
"NumberRangeUnderflow": "Please select a value that is no less than 2.",
"PatternMismatch": "Please match the requested format.",
"RadioMissing": "Please select one of these options.",
"SelectMissing": "Please select an item in the list.",
"StepMismatch": "Please select a valid value. The two nearest valid values are 2 and 4.",
"ValueMissing": "Please fill out this field."
}
STR
- change app language to ar, fa, or my and restart to apply
- change to spoof english
- test
ER
- you get the en-US hash
AR
ANALYSIS
- dates: this seems to always be 2023-12-31 format regardless of locale, this is the valid set in the element's min or max value. It can change order on RTL (when not spoofing as english) e.g. 31-12-2023 but that is because of RTL not formatting, so I think dates are not affected
- numbers - not all validation messages with numbers were affected, so this is definitely fixable
- the only line that failed to get spoofed (in my tests which may/maynot be exhaustive) is the one in the pic
here's the hashes when spoofing as en-US (yes, the arabext 4 is different from the arab 4) and en-US for comparison
numberingSystem
app: | hash: string:
ar: arab: a74be209: "Please select a valid value. The two nearest valid values are ٢ and ٤.",
fa: arabext: a4227729: "Please select a valid value. The two nearest valid values are ۲ and ۴.",
my: mymr: 36e68dc9: "Please select a valid value. The two nearest valid values are ၂ and ၄."
en: latn: ca1379a9: "Please select a valid value. The two nearest valid values are 2 and 4."