Commit f8604998 authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Bug 24159: version check does not deal with platform specific checks

For known platforms, append "-Windows", "-Linux", "-MacOS", or "-Android"
to torbrowser.version before checking against the recommended versions
JSON file. This allows for platform differences in the supported version.
parent 411f9537
......@@ -752,13 +752,28 @@ function torbutton_do_async_versioncheck() {
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) {
var platformSuffix;
var platform = Services.appinfo.OS;
switch (platform) {
case "WINNT":
platformSuffix = "Windows";
case "Darwin":
platformSuffix = "MacOS";
case "Linux":
case "Android":
platformSuffix = platform;
if (platformSuffix)
my_version += "-" + platformSuffix;
if (version_list.indexOf(my_version) >= 0) {
torbutton_log(3, "Version check passed.");
m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, false);
torbutton_log(5, "Your Tor Browser is out of date.");
m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, true);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment