[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #21608 [Applications/Tor Browser]: Investigate `DateTimeFormat.formatToParts` for fingerprintability issues



#21608: Investigate `DateTimeFormat.formatToParts` for fingerprintability issues
-------------------------------------------------+-------------------------
 Reporter:  gk                                   |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  High                                 |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  ff52-esr, tbb-7.0-must-alpha, tbb-   |  Actual Points:
  fingerprinting, TorBrowserTeam201705R          |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor4
-------------------------------------------------+-------------------------
Changes (by arthuredelstein):

 * status:  new => needs_review
 * keywords:  ff52-esr, tbb-7.0-must-alpha, tbb-fingerprinting =>
     ff52-esr, tbb-7.0-must-alpha, tbb-fingerprinting,
     TorBrowserTeam201705R


Comment:

 I ran the following manual test:

 {{{
 var date = Date.UTC(2012, 11, 17, 3, 0, 42);

 var formatter = new Intl.DateTimeFormat(undefined, {
   weekday: 'long',
   year: 'numeric',
   month: 'numeric',
   day: 'numeric',
   hour: 'numeric',
   minute: 'numeric',
   second: 'numeric',
   hour12: true,
   timeZone: 'UTC'
 });

 console.log(formatter.resolvedOptions().locale);
 console.log(formatter.format(date));
 console.log(JSON.stringify(formatter.formatToParts(date)));
 }}}

 The result for `javascript.use_use_english_locale = true` was:
 {{{
 en-US
 Monday, 12/17/2012, 3:00:42 AM
 [{"type":"weekday","value":"Monday"},{"type":"literal","value":",
 "},{"type":"month","value":"12"},{"type":"literal","value":"/"},{"type":"day","value":"17"},{"type":"literal","value":"/"},{"type":"year","value":"2012"},{"type":"literal","value":",
 "},{"type":"hour","value":"3"},{"type":"literal","value":":"},{"type":"minute","value":"00"},{"type":"literal","value":":"},{"type":"second","value":"42"},{"type":"literal","value":"
 "},{"type":"dayPeriod","value":"AM"}]
 }}}

 The result for `javascript.use_use_english_locale = false` was:

 {{{
 de-DE
 Montag, 17.12.2012, 3:00:42 vorm.
 [{"type":"weekday","value":"Montag"},{"type":"literal","value":",
 "},{"type":"day","value":"17"},{"type":"literal","value":"."},{"type":"month","value":"12"},{"type":"literal","value":"."},{"type":"year","value":"2012"},{"type":"literal","value":",
 "},{"type":"hour","value":"3"},{"type":"literal","value":":"},{"type":"minute","value":"00"},{"type":"literal","value":":"},{"type":"second","value":"42"},{"type":"literal","value":"
 "},{"type":"dayPeriod","value":"vorm."}]
 }}}

 so the default pref setting we already have in TBB
 (`javascript.use_use_english_locale` = `true`) is enough and no patch is
 needed here (please review).

 It will be good to include a regression test for this. I will add a
 comment in #21784.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21608#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs