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,12 +752,27 @@ 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) {
torbutton_log(3, "Version check passed.");
m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, false);
return;
}
var platformSuffix;
var platform = Services.appinfo.OS;
switch (platform) {
case "WINNT":
platformSuffix = "Windows";
break;
case "Darwin":
platformSuffix = "MacOS";
break;
case "Linux":
case "Android":
platformSuffix = platform;
break;
}
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);
return;
}
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