[or-cvs] r15833: Perform automatic updates in all cases for FF3 by default. I (in torbutton/trunk/src: . chrome/content chrome/locale/en-US defaults/preferences)

mikeperry at seul.org mikeperry at seul.org
Fri Jul 11 09:30:16 UTC 2008


Author: mikeperry
Date: 2008-07-11 05:30:16 -0400 (Fri, 11 Jul 2008)
New Revision: 15833

Modified:
   torbutton/trunk/src/chrome/content/preferences.js
   torbutton/trunk/src/chrome/content/preferences.xul
   torbutton/trunk/src/chrome/content/torbutton.js
   torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
   torbutton/trunk/src/defaults/preferences/preferences.js
   torbutton/trunk/src/install.rdf
Log:

Perform automatic updates in all cases for FF3 by default. I
suspect something is broken with toggling automatic updates
in Firefox, so this is probably a good idea for that reason.
It makes me slightly nervous for general fingerprinting
reasons, but they are fully encrypted now, so for people who
get all their addons from a.m.o it is not that big a deal.



Modified: torbutton/trunk/src/chrome/content/preferences.js
===================================================================
--- torbutton/trunk/src/chrome/content/preferences.js	2008-07-11 09:11:16 UTC (rev 15832)
+++ torbutton/trunk/src/chrome/content/preferences.js	2008-07-11 09:30:16 UTC (rev 15833)
@@ -526,6 +526,7 @@
     torbutton_reset_browser_prefs();
 
     chrome.torbutton_init_prefs();
+    chrome.torbutton_do_fresh_install();
     torbutton_log(3, "Prefs reset");
 
     if(was_enabled) {

Modified: torbutton/trunk/src/chrome/content/preferences.xul
===================================================================
--- torbutton/trunk/src/chrome/content/preferences.xul	2008-07-11 09:11:16 UTC (rev 15832)
+++ torbutton/trunk/src/chrome/content/preferences.xul	2008-07-11 09:30:16 UTC (rev 15833)
@@ -144,14 +144,14 @@
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_resizeOnToggle" label="&torbutton.prefs.resize_on_toggle;" 
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
-        <checkbox id="torbutton_noUpdates" label="&torbutton.prefs.no_updates;" 
-                  oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_noSearch" label="&torbutton.prefs.no_search;" 
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_blockTorFileNet" label="&torbutton.prefs.block_tor_file_net;" 
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_blockNonTorFileNet" label="&torbutton.prefs.block_nontor_file_net;" 
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
+        <checkbox id="torbutton_noUpdates" label="&torbutton.prefs.no_updates;" 
+                  oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_closeTor" label="&torbutton.prefs.close_tor;" 
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_closeNonTor" label="&torbutton.prefs.close_nontor;" 

Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js	2008-07-11 09:11:16 UTC (rev 15832)
+++ torbutton/trunk/src/chrome/content/torbutton.js	2008-07-11 09:30:16 UTC (rev 15833)
@@ -882,8 +882,6 @@
         }
     }
 
-    // XXX: All updates are now required to be authenticated on FF3.. 
-    // Perhaps this should be a diff pref.. or default to off?
     if (torprefs.getBoolPref("no_updates")) {
         torbutton_setBoolPref("extensions.update.enabled", "extension_update",
                 !mode, mode, changed);
@@ -2087,11 +2085,29 @@
     }
 }
 
-function torbutton_do_onetime_startup()
+function torbutton_do_fresh_install() 
 {
+    if(m_tb_prefs.getBoolPref("extensions.torbutton.fresh_install")) {
+        if(m_tb_ff3) {
+            // Perform updates if FF3. They are secure now.
+            m_tb_prefs.setBoolPref("extensions.torbutton.no_updates", false);
+        }
+        m_tb_prefs.setBoolPref("extensions.torbutton.fresh_install", false);
+    }
+}
+
+function torbutton_do_startup()
+{
     if(m_tb_prefs.getBoolPref("extensions.torbutton.startup")) {
+        // Do this before the unique pref observer is registered
+        // in torbutton_do_main_window_startup to avoid
+        // popup notification.
+        torbutton_do_fresh_install();
+       
         torbutton_do_main_window_startup();
 
+        // XXX: This is probably better done by reimplementing the 
+        // component.
         if(m_tb_prefs.getBoolPref("extensions.torbutton.block_remoting")) {
             var appSupport = Cc["@mozilla.org/toolkit/native-app-support;1"]
                 .getService(Ci.nsINativeAppSupport);
@@ -2199,7 +2215,7 @@
         torbutton_init();
     }
     
-    torbutton_do_onetime_startup();
+    torbutton_do_startup();
     torbutton_crash_recover();
 
     torbutton_get_plugin_mimetypes();

Modified: torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd	2008-07-11 09:11:16 UTC (rev 15832)
+++ torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd	2008-07-11 09:30:16 UTC (rev 15833)
@@ -41,7 +41,7 @@
 <!ENTITY torbutton.prefs.disable_plugins    "Disable plugins during Tor usage (crucial)">
 <!ENTITY torbutton.prefs.kill_bad_js        "Hook dangerous javascript (crucial)">
 <!ENTITY torbutton.prefs.isolate_content    "Isolate dynamic content to Tor state (crucial)">
-<!ENTITY torbutton.prefs.no_updates         "Disable updates during Tor usage (recommended)">
+<!ENTITY torbutton.prefs.no_updates         "Disable updates during Tor usage">
 <!ENTITY torbutton.prefs.set_uagent         "Set user agent for Tor usage (crucial)">
 <!ENTITY torbutton.prefs.dynamic              "Dynamic Content">
 <!ENTITY torbutton.prefs.cookies              "Cookies">

Modified: torbutton/trunk/src/defaults/preferences/preferences.js
===================================================================
--- torbutton/trunk/src/defaults/preferences/preferences.js	2008-07-11 09:11:16 UTC (rev 15832)
+++ torbutton/trunk/src/defaults/preferences/preferences.js	2008-07-11 09:30:16 UTC (rev 15833)
@@ -84,6 +84,7 @@
 pref("extensions.torbutton.block_cert_dialogs",false);
 pref("extensions.torbutton.asked_ca_disable",false);
 pref("extensions.torbutton.warned_ff3",false);
+pref("extensions.torbutton.fresh_install",true);
 
 // Security prefs:
 pref("extensions.torbutton.no_tor_plugins",true);

Modified: torbutton/trunk/src/install.rdf
===================================================================
--- torbutton/trunk/src/install.rdf	2008-07-11 09:11:16 UTC (rev 15832)
+++ torbutton/trunk/src/install.rdf	2008-07-11 09:30:16 UTC (rev 15833)
@@ -6,7 +6,7 @@
         <em:name>Torbutton</em:name>
         <em:creator>Mike Perry &amp; Scott Squires</em:creator>
         <em:id>{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}</em:id>
-        <em:version>1.2.0rc5</em:version>
+        <em:version>1.2.0rc5-dev</em:version>
         <em:homepageURL>https://torbutton.torproject.org/dev/</em:homepageURL>
         <em:optionsURL>chrome://torbutton/content/preferences.xul</em:optionsURL>
         <em:iconURL>chrome://torbutton/skin/tor.png</em:iconURL>



More information about the tor-commits mailing list