Improve potentially confusing date format on cert error pages
Categories
(Firefox :: Security, enhancement, P3)
Tracking
()
People
(Reporter: riccardo.kyogre, Assigned: eemeli)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
Set Windows language to English (US) and locale to Italian.
Visit a webpage with an expired SSL certificate.
Actual results:
A warning error is printed, with dates formatted according to the system language.
(e.g. "Your computer clock is set to 4/24/2019.")
Expected results:
A warning error is printed, with dates formatted according to the system locale.
(e.g. "Your computer clock is set to 24/04/2019.")
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Do we have an opinion on this? Currently we're using Services.intl.DateTimeFormat to format dates on cert error pages, but if someone tells me how to make it use whatever we prefer I'm happy to do that.
Comment 2•6 years ago
•
|
||
(In reply to Riccardo Paolo Bestetti from comment #0)
Set Windows language to English (US) and locale to Italian.
What do you mean with "locale"? Regional preferences?
What's the language used in Firefox?
Please copy the last table you find in about:support, it should have all the relevant information.
This might also be relevant
https://firefox-source-docs.mozilla.org/intl/locale.html#regional-preferences
For that reason, by default, Gecko will only look into OS Preferences if the language portion of the locale of the OS and Firefox match. That means that if Windows is in “en-AU” and Firefox is in “en-US” Gecko will look into Windows Regional Preferences, but if Windows is in “de-CH” and Firefox is in “fr-FR” it won’t. In order to force Gecko to look into OS preferences irrelevant of the language match, set the flag intl.regional_prefs.use_os_locales to true.
Comment hidden (off-topic) |
Reporter | ||
Comment 4•6 years ago
|
||
(In reply to Riccardo Paolo Bestetti from comment #3)
So sorry about the formatting. Please ignore comment #3, use this amended version for better readability:
(In reply to Francesco Lodolo [:flod] from comment #2)
(In reply to Riccardo Paolo Bestetti from comment #0)
Set Windows language to English (US) and locale to Italian.
What do you mean with "locale"? Regional preferences?
What's the language used in Firefox?
Yes, sorry - what I meant by "locale" was Regional preferences.
The display language for Firefox is "English (United States)", which was automatically selected from the system language (I didn't change it).
Please copy the last table you find in about:support, it should have all the relevant information.
Application Settings
Requested Locales ["en-US"]
Available Locales ["en-US"]
App Locales ["en-US"]
Regional Preferences ["en-US"]
Default Locale "en-US"
Operating System
System Locales ["en-US"]
Regional Preferences ["it-IT"]
This might also be relevant
https://firefox-source-docs.mozilla.org/intl/locale.html#regional-preferencesFor that reason, by default, Gecko will only look into OS Preferences if the language portion of the locale of the OS and Firefox match. That means that if Windows is in “en-AU” and Firefox is in “en-US” Gecko will look into Windows Regional Preferences, but if Windows is in “de-CH” and Firefox is in “fr-FR” it won’t. In order to force Gecko to look into OS preferences irrelevant of the language match, set the flag intl.regional_prefs.use_os_locales to true.
This definitely seems to clarify the issue - from the docs and the table above it looks like everything is working as specced, and the arguments that are made sound plausible.
Although I'd argue this is a security issue: I was definitely expecting the dates to be formatted according to my OS preferences, and if the date had been e.g. 5/10/2019 I would never had guessed the certificate would have expired tomorrow instead of on the 5th of October.
Comment 5•6 years ago
|
||
The priority flag is not set for this bug.
:wleung, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 6•6 years ago
|
||
Possible solutions:
- Use an ISO format (e.g. 2019-10-05). No space for interpretation there.
- Use a long format, with the month spelled out.
Personally, I think 2019-10-05 would work just fine in this context.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 7•6 years ago
|
||
Hi, I have added long
format of date and time in all cases of cert errors. Is that the same issue or different.
Updated•6 years ago
|
Comment 8•6 years ago
|
||
(In reply to Monika Maheshwari [:MonikaMaheshwari] from comment #7)
Hi, I have added
long
format of date and time in all cases of cert errors. Is that the same issue or different.
It's a different issue. This is about the date format we're using. In comment 6 flod mentions that we should probably change this format everywhere to be unambiguous. However, I'm not sure this bug can presently be worked on as we're heavily changing this code in bug 1549561
Assignee | ||
Comment 10•2 years ago
|
||
This will get fixed as a part of bug 1734217 by this change: https://phabricator.services.mozilla.com/D155951#inline-859545
Assignee | ||
Updated•2 years ago
|
Description
•