Closed Bug 1546625 Opened 6 years ago Closed 2 years ago

Improve potentially confusing date format on cert error pages

Categories

(Firefox :: Security, enhancement, P3)

66 Branch
enhancement

Tracking

()

RESOLVED FIXED

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.")

Component: Untriaged → Security

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.

Flags: needinfo?(l10n)
Flags: needinfo?(francesco.lodolo)

(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.

Flags: needinfo?(riccardo.kyogre)
Flags: needinfo?(l10n)
Flags: needinfo?(francesco.lodolo)

(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-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.

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.

The priority flag is not set for this bug.
:wleung, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(wleung)

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.

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true
Priority: -- → P3
Summary: Date format in SSL warning page is incorrect → Improve potentially confusing date format on cert error pages
Flags: needinfo?(wleung)

Hi, I have added long format of date and time in all cases of cert errors. Is that the same issue or different.

Flags: needinfo?(jhofmann)

(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

Flags: needinfo?(jhofmann)

This will get fixed as a part of bug 1734217 by this change: https://phabricator.services.mozilla.com/D155951#inline-859545

Assignee: nobody → earo
Status: NEW → ASSIGNED
Depends on: 1734217
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.