Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #24159
Closed (moved) (moved)
Open
Issue created Nov 07, 2017 by Georg Koppen@gk

The Torbutton version check does not deal properly with platform specific checks

Torbutton checks on first start (and then periodically) whether the currently deployed version is still up-to-date and, if not, shows a big warning and an error pointing to the onion menu (allowing the user to update manually).

In order to do so it requests: https://www.torproject.org/projects/torbrowser/RecommendedTBBVersions which delivers back something like:

[
"7.0.6",
"7.0.6-Windows",
"7.0.7",
"7.0.7-Windows",
"7.0.8",
"7.0.8-Windows",
"7.0.9",
"7.0.9-MacOS",
"7.0.9-Linux",
"7.5a5",
"7.5a5-Windows",
"7.5a6",
"7.5a6-Windows",
"7.5a7",
"7.5a7-MacOS",
"7.5a7-Linux"
]

The idea with the platform specifiers included was to allow users to stay on different versions depending on which platform they are. This is quite handy in cases like the recent one where we needed to provide updates to Linux and macOS users but Windows users were not affected. The example response above is meant for such a scenario: a Tor Browser < 7.0.9 is not recommended anymore for Linux or macOS while Windows users, which stay on 7.0.8, are perfectly fine provided they have at least version 7.0.6.

Now, that does not work as the code in question just checks torbrowser.version which does not contain platform information (anymore):

          try {
            var version_list = JSON.parse(req.responseText);
            var my_version = m_tb_prefs.getCharPref("torbrowser.version");
            for (var v in version_list) {
              if (version_list[v] == my_version) {
                torbutton_log(3, "Version check passed.");
                m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, false);
                return;
              }
            }
            torbutton_log(5, "Your Tor Browser is out of date.");
            m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, true);
            return;
          } catch(e) {
            torbutton_log(5, "Version check failed! JSON parsing error: "+e);
            return;
          }

One way to fix that is just adding "-$PLATFORM" to my_version (assuming the platform notation we get with some XPCOM API is the same we have in our recommended versions file).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking