[or-cvs] r10863: Reset shutdown option if user wants to manually manage cooki (in torbutton/trunk/src: . chrome/content chrome/locale/de-AT chrome/locale/de-CH chrome/locale/de-DE chrome/locale/el-GR chrome/locale/en-US chrome/locale/es-AR chrome/locale/fr-FR chrome/locale/hr-HR chrome/locale/it-IT chrome/locale/nl-NL chrome/locale/pl-PL chrome/locale/pt-BR chrome/locale/ru-RU chrome/locale/sl-SI chrome/locale/zh-CN chrome/locale/zh-TW components defaults/preferences)

mikeperry at seul.org mikeperry at seul.org
Wed Jul 18 07:38:31 UTC 2007


Author: mikeperry
Date: 2007-07-18 03:38:31 -0400 (Wed, 18 Jul 2007)
New Revision: 10863

Modified:
   torbutton/trunk/src/CHANGELOG
   torbutton/trunk/src/chrome/content/jshooks.js
   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/de-AT/torbutton.dtd
   torbutton/trunk/src/chrome/locale/de-CH/torbutton.dtd
   torbutton/trunk/src/chrome/locale/de-DE/torbutton.dtd
   torbutton/trunk/src/chrome/locale/el-GR/torbutton.dtd
   torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
   torbutton/trunk/src/chrome/locale/es-AR/torbutton.dtd
   torbutton/trunk/src/chrome/locale/fr-FR/torbutton.dtd
   torbutton/trunk/src/chrome/locale/hr-HR/torbutton.dtd
   torbutton/trunk/src/chrome/locale/it-IT/torbutton.dtd
   torbutton/trunk/src/chrome/locale/nl-NL/torbutton.dtd
   torbutton/trunk/src/chrome/locale/pl-PL/torbutton.dtd
   torbutton/trunk/src/chrome/locale/pt-BR/torbutton.dtd
   torbutton/trunk/src/chrome/locale/ru-RU/torbutton.dtd
   torbutton/trunk/src/chrome/locale/sl-SI/torbutton.dtd
   torbutton/trunk/src/chrome/locale/zh-CN/torbutton.dtd
   torbutton/trunk/src/chrome/locale/zh-TW/torbutton.dtd
   torbutton/trunk/src/components/cssblocker.js
   torbutton/trunk/src/defaults/preferences/preferences.js
   torbutton/trunk/src/install.rdf
Log:

Reset shutdown option if user wants to manually manage
cookies. Add code to detect date hooking failures to zero in
on Bug #460. Pref to disable "DOM Storage" during Tor usage




Modified: torbutton/trunk/src/CHANGELOG
===================================================================
--- torbutton/trunk/src/CHANGELOG	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/CHANGELOG	2007-07-18 07:38:31 UTC (rev 10863)
@@ -1,3 +1,9 @@
+1.1.5
+  17 Jul 2007
+  * bugfix: Reset shutdown option if user wants to manually manage cookies
+  * misc: Add code to detect date hooking failures to zero in on Bug #460
+  * new: Pref to disable "DOM Storage" during Tor usage
+
 1.1.4 - Defcon CD Release
   6 Jul 2007
   * bugfix: Make plugin state tied to tab load state also

Modified: torbutton/trunk/src/chrome/content/jshooks.js
===================================================================
--- torbutton/trunk/src/chrome/content/jshooks.js	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/content/jshooks.js	2007-07-18 07:38:31 UTC (rev 10863)
@@ -1,6 +1,6 @@
 window.__HookObjects = function() {
-  /* XXX: Removeme once verified not to run twice */
-  if (typeof(window.__tb_hooks_ran) != 'undefined') {
+  /* XXX: Removeme once bug #460 is resolved */
+  if (typeof(window.__tb_hooks_ran) == "boolean") {
       alert("Error, double jshook!");
       return;
   }
@@ -159,10 +159,12 @@
   Date.UTC=function(){return tmp.apply(tmp, arguments); }
 }
 
-if (window.__HookObjects) {
+if (typeof(window.__HookObjects) != "undefined") {
     window.__HookObjects();
 
+    window.__HookObjects = undefined;
     delete window['__HookObjects'];
+    delete window['__CheckFlag'];
     delete window['__tb_set_uagent'];
     delete window['__tb_oscpu'];
     delete window['__tb_platform'];

Modified: torbutton/trunk/src/chrome/content/preferences.js
===================================================================
--- torbutton/trunk/src/chrome/content/preferences.js	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/content/preferences.js	2007-07-18 07:38:31 UTC (rev 10863)
@@ -76,6 +76,7 @@
         doc.getElementById('torbutton_gopherPort').disabled = false;
         doc.getElementById('torbutton_socksHost').disabled = false;
         doc.getElementById('torbutton_socksPort').disabled = false;
+        /* Do not reset these on every document update..
         doc.getElementById('torbutton_httpProxy').value    = o_customprefs.getCharPref('http_proxy');
         doc.getElementById('torbutton_httpPort').value     = o_customprefs.getIntPref('http_port');
         doc.getElementById('torbutton_httpsProxy').value   = o_customprefs.getCharPref('https_proxy');
@@ -86,6 +87,7 @@
         doc.getElementById('torbutton_gopherPort').value   = o_customprefs.getIntPref('gopher_port');
         doc.getElementById('torbutton_socksHost').value    = o_customprefs.getCharPref('socks_host');
         doc.getElementById('torbutton_socksPort').value    = o_customprefs.getIntPref('socks_port');
+        */
     }
 }
 
@@ -159,6 +161,8 @@
         o_torprefs.setBoolPref('cookie_jars', false);
         o_torprefs.setBoolPref('clear_cookies', false); 
     }
+    doc.getElementById('torbutton_noDomStorage').checked = 
+        o_torprefs.getBoolPref('disable_domstorage');
     
     if(o_torprefs.getIntPref('shutdown_method') == 0) {
         doc.getElementById('torbutton_shutdownGroup').selectedItem
@@ -231,6 +235,7 @@
     o_torprefs.setBoolPref('block_cache', doc.getElementById('torbutton_blockCache').selected);
     o_torprefs.setBoolPref('clear_cookies', doc.getElementById('torbutton_clearCookies').selected);
     o_torprefs.setBoolPref('cookie_jars', doc.getElementById('torbutton_cookieJars').selected);
+    o_torprefs.setBoolPref('disable_domstorage', doc.getElementById('torbutton_noDomStorage').checked);
 
 
     if(doc.getElementById('torbutton_shutdownGroup').selectedItem ==
@@ -243,6 +248,14 @@
         o_torprefs.setIntPref('shutdown_method', 2); 
     }
 
+    /* Reset the shutdown option if the user wants to manage own cookies */
+    if(!o_torprefs.getBoolPref('cookie_jars') 
+            && !o_torprefs.getBoolPref('clear_cookies')) {
+        o_torprefs.setIntPref('shutdown_method', 0); 
+        doc.getElementById('torbutton_shutdownGroup').selectedItem
+            = doc.getElementById('torbutton_noShutdown');
+    }
+
     o_torprefs.setBoolPref('disable_sessionstore', doc.getElementById('torbutton_noSessionStore').checked);
     o_torprefs.setBoolPref('block_thread', doc.getElementById('torbutton_blockTorHRead').checked);
     o_torprefs.setBoolPref('block_thwrite', doc.getElementById('torbutton_blockTorHWrite').checked);

Modified: torbutton/trunk/src/chrome/content/preferences.xul
===================================================================
--- torbutton/trunk/src/chrome/content/preferences.xul	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/content/preferences.xul	2007-07-18 07:38:31 UTC (rev 10863)
@@ -152,6 +152,7 @@
           </tabpanel>
           <tabpanel id="cache">
            <vbox>
+            <!-- FIXME: maybe add pref to manage cache by yourself... --> 
             <radiogroup id="torbutton_cacheGroup">
              <radio id="torbutton_clearCache" 
                    label="&torbutton.prefs.clear_cache;" 
@@ -175,6 +176,9 @@
                     label="&torbutton.prefs.mmm_cookies;" 
                     oncommand="torbutton_prefs_set_field_attributes(document)"/> 
             </radiogroup>
+            <checkbox id="torbutton_noDomStorage" 
+                   label="&torbutton.prefs.disable_domstorage;" 
+                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
            </vbox>
           </tabpanel>
           <tabpanel id="shutdown">

Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/content/torbutton.js	2007-07-18 07:38:31 UTC (rev 10863)
@@ -480,6 +480,10 @@
         m_tb_prefs.setIntPref("network.http.sendRefererHeader", mode ? 0 : 2);
     }
 
+    if(torprefs.getBoolPref("disable_domstorage")) {
+        m_tb_prefs.setBoolPref("dom.storage.enabled", !mode);
+    }
+
     if(torprefs.getBoolPref("spoof_english") && mode) {
         m_tb_prefs.setCharPref("intl.accept_charsets", 
                 torprefs.getCharPref("spoof_charset"));
@@ -906,6 +910,18 @@
     return null;
 }
 
+/* This seems to be necessary due to javascript's
+ * nebulous scoping/parsing/evaluations issues. Having this as
+ * a standalone statement seems to cause the flag
+ * to become defined after just parsing, not execution */
+function torbutton_set_flag(obj, flag) {
+    obj[flag] = true;
+}
+
+function torbutton_check_flag(obj, flag) {
+    return (typeof(obj[flag]) != 'undefined');
+}
+
 function torbutton_hookdoc(win, doc) {
     torbutton_log(1, "Hooking document");
     if(doc.doctype) {
@@ -915,24 +931,40 @@
         torbutton_init();
     }
 
+    var tor_tag = !m_tb_prefs.getBoolPref("extensions.torbutton.tor_enabled");
+    
     // We can't just tag the document here because it is possible
     // to hit reload at just the right point such that the document
     // has been cleared but the window remained.
-    if(typeof(win.__tb_did_hook) != 'undefined')
+    if(torbutton_check_flag(win, "__tb_did_hook")) {
+        torbutton_log(1, "Did hook " 
+                + torbutton_check_flag(win, "__tb_did_hook"));
+        /* XXX: Remove this once bug #460 is resolved */
+        if(!tor_tag && 
+                !torbutton_check_flag(win.window.wrappedJSObject, 
+                    "__tb_hooks_ran")) {
+            torbutton_log(5, "FALSE WIN HOOKING. Please reprot bug+website!");
+            win.alert("False win hooking. Please report bug+website!");
+        }
         return; // Ran already
-    
-    win.__tb_did_hook = true;
+    }
+    torbutton_set_flag(win, "__tb_did_hook");
 
     // We also can't just tag the window either, because it gets
     // cleared on back/fwd(!??)
-    if(typeof(doc.__tb_did_hook) != 'undefined')
+    if(torbutton_check_flag(doc, "__tb_did_hook")) {
+        /* XXX: Remove this once bug #460 is resolved */
+        if(!tor_tag && 
+                !torbutton_check_flag(win.window.wrappedJSObject, "__tb_hooks_ran")) {
+            torbutton_log(5, "FALSE DOC HOOKING. Please report bug+website!");
+            win.alert("False doc hooking. Please report bug+website!");
+        } 
         return; // Ran already
-    
-    doc.__tb_did_hook = true;
+    }
+    torbutton_set_flag(doc, "__tb_did_hook");
 
     torbutton_log(1, "JS to be set to: " +m_tb_prefs.getBoolPref("javascript.enabled"));
     var browser = getBrowser();
-    var tor_tag = !m_tb_prefs.getBoolPref("extensions.torbutton.tor_enabled");
     var kill_plugins = m_tb_prefs.getBoolPref("extensions.torbutton.no_tor_plugins");
     var js_enabled = m_tb_prefs.getBoolPref("javascript.enabled");
 

Modified: torbutton/trunk/src/chrome/locale/de-AT/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/de-AT/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/de-AT/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/de-CH/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/de-CH/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/de-CH/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/de-DE/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/de-DE/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/de-DE/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/el-GR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/el-GR/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/el-GR/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/es-AR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/es-AR/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/es-AR/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/fr-FR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/fr-FR/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/fr-FR/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/hr-HR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/hr-HR/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/hr-HR/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/it-IT/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/it-IT/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/it-IT/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/nl-NL/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/nl-NL/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/nl-NL/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/pl-PL/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/pl-PL/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/pl-PL/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/pt-BR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/pt-BR/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/pt-BR/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/ru-RU/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/ru-RU/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/ru-RU/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/sl-SI/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/sl-SI/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/sl-SI/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/zh-CN/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/zh-CN/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/zh-CN/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/chrome/locale/zh-TW/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/zh-TW/torbutton.dtd	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/chrome/locale/zh-TW/torbutton.dtd	2007-07-18 07:38:31 UTC (rev 10863)
@@ -56,3 +56,4 @@
 <!ENTITY torbutton.prefs.headers               "Headers">
 <!ENTITY torbutton.prefs.spoof_english         "Spoof US English Browser">
 <!ENTITY torbutton.prefs.disable_referer       "Don't send referer during Tor usage (may break some sites)">
+<!ENTITY torbutton.prefs.disable_domstorage    "Disable DOM Storage during Tor usage (crucial)">

Modified: torbutton/trunk/src/components/cssblocker.js
===================================================================
--- torbutton/trunk/src/components/cssblocker.js	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/components/cssblocker.js	2007-07-18 07:38:31 UTC (rev 10863)
@@ -165,8 +165,11 @@
         if (browser.contentDocument == doc) {
             if (typeof(browser.__tb_js_state) == 'undefined') {
                 dump("UNTAGGED WINDOW1!!!!!!!!!");
+                return block;
             }
             if(browser.__tb_js_state == torTag) {
+                // XXX: Verify this doesn't give false postives 
+                // due to browser vs tab property inheritance strangeness
                 return ok;
             } else {
                 dump("block1\n");
@@ -179,6 +182,7 @@
             if (b && b.contentDocument == doc) {
                 if (typeof(browser.__tb_js_state) == 'undefined') {
                     dump("UNTAGGED WINDOW2!!!!!!!!!");
+                    return block;
                 }
 
                 if(b.__tb_js_state == torTag) {
@@ -238,7 +242,7 @@
 	registerSelf: function(compMgr, fileSpec, location, type) {
 		compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
 		compMgr.registerFactoryLocation(CSSB_CID, 
-										"Adblock content policy",
+										"Torbutton content policy",
 										CSSB_CONTRACTID,
 										fileSpec, location, type);
 

Modified: torbutton/trunk/src/defaults/preferences/preferences.js
===================================================================
--- torbutton/trunk/src/defaults/preferences/preferences.js	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/defaults/preferences/preferences.js	2007-07-18 07:38:31 UTC (rev 10863)
@@ -43,6 +43,7 @@
 pref("extensions.torbutton.no_tor_plugins",true);
 pref("extensions.torbutton.clear_cookies",true);
 pref("extensions.torbutton.cookie_jars",false);
+pref("extensions.torbutton.disable_domstorage",true);
 pref("extensions.torbutton.clear_cache",true);
 pref("extensions.torbutton.block_cache",false);
 pref("extensions.torbutton.clear_history",false);

Modified: torbutton/trunk/src/install.rdf
===================================================================
--- torbutton/trunk/src/install.rdf	2007-07-18 07:13:15 UTC (rev 10862)
+++ torbutton/trunk/src/install.rdf	2007-07-18 07:38:31 UTC (rev 10863)
@@ -6,7 +6,7 @@
         <em:name>Torbutton</em:name>
         <em:creator>Scott Squires &amp; Mike Perry</em:creator>
         <em:id>{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}</em:id>
-        <em:version>1.1.4-alpha</em:version>
+        <em:version>1.1.5-alpha</em:version>
         <em:homepageURL>http://freehaven.net/~squires/torbutton/</em:homepageURL>
         <em:updateURL>http://freehaven.net/~squires/torbutton/update.rdf</em:updateURL>
         <em:optionsURL>chrome://torbutton/content/preferences.xul</em:optionsURL>



More information about the tor-commits mailing list