Opened 8 years ago

Closed 3 years ago

#4545 closed defect (wontfix)

torbutton_set_timezone() does not work (properly)

Reported by: gk Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-torbutton, tbb-fingerprinting-time
Cc: gk Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

While implementing the normalization of the timezone (thanks for the idea Mike) I figured out that the function is not working (properly) in Torbutton currently. Maybe that is intentionally as I have not looked at the Torbutton code thoroughly. In this case just ignore my comments and close this ticket as invalid (or whatever). There are two points to raise:

1) The original timezone is not saved in the preferences, I get always a UTC+00:00 which could be bad if the user is toggling the anon mode (I know toggling is dead but the option is still available buried in the preferences).

2) The code in the function does not cope with timezones like GMT-3:30 as Math.floor() gives wrong values back (in this case "-6" instead of "-5").

Child Tickets

Change History (7)

comment:1 Changed 8 years ago by mikeperry

Component: TorbuttonTorBrowserButton
Milestone: TorBrowserBundle 2.2.x-stable
Priority: minormajor

#2 might be a fingerprinting concern that applies to TBB.

comment:2 Changed 8 years ago by gk

Cc: g.koppen@… added

Hmmm, seems one has to add oneself to Cc even if one has opened the ticket. Stupid.

comment:3 Changed 8 years ago by mikeperry

Does your second point mean that TBB users in those timezones get some timezone other than UTC set? Like UTC+0:30?

comment:4 Changed 8 years ago by gk

No, I just meant that the saved offset string is wrong in those cases (that's why, I thought this ticket only describes minor issues). That said instead of

  if(Math.floor(offset/60) < 10) {
    offStr += "0";
  }
  offStr += Math.floor(offset/60)+":";
  if((offset%60) < 10) {
    offStr += "0";
  }
  offStr += (offset%60);

something like

   var minutes = offset % 60;
   // Division in JS gives always floating point results we do not want.
   // And Math.floor() is not working properly for negative values.
   if ((offset - minutes) / 60 < 10) {
     offStr += "0";
   }
   offStr += ((offset - minutes) / 60) + ":";
   if ((minutes) < 10) {
     offStr += "0";
   }
   offStr += (minutes);

should fix that "issue".

comment:5 Changed 7 years ago by mikeperry

Component: TorBrowserButtonTorbutton

This is a toggle bug.

comment:6 Changed 3 years ago by bugzilla

Component: Applications/TorbuttonApplications/Tor Browser
Keywords: tbb-torbutton tbb-fingerprinting-time added
Milestone: TorBrowserBundle 2.2.x-stable
Owner: changed from mikeperry to tbb-team
Severity: Normal
Status: newassigned

Angry user said:

Reveals local time of my PC instead of UTC

https://blog.torproject.org/blog/tor-browser-602-released#comment-191587

comment:7 Changed 3 years ago by gk

Cc: gk added; g.koppen@… removed
Resolution: wontfix
Status: assignedclosed

This is obsolete now that the code in question is gone.

Note: See TracTickets for help on using tickets.