[tor-commits] [torbutton/master] Bug 13998: Bind volatilePrivatePermissions to disk

mikeperry at torproject.org mikeperry at torproject.org
Tue Jan 13 16:36:39 UTC 2015


commit eb343e2cdcbd35ae6140543f248969a7e3b9aa8d
Author: Georg Koppen <gk at torproject.org>
Date:   Tue Jan 13 10:57:00 2015 +0000

     Bug 13998: Bind volatilePrivatePermissions to disk
    
    We set `noscript.volatilePrivatePermissions` to `true` if disk records
    are disabled and otherwise to `false`. All this in the assumption
    NoScript is enabled at all.
---
 src/chrome/content/preferences.js |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/chrome/content/preferences.js b/src/chrome/content/preferences.js
index 75937eb..f67906c 100644
--- a/src/chrome/content/preferences.js
+++ b/src/chrome/content/preferences.js
@@ -286,6 +286,20 @@ function torbutton_prefs_save(doc) {
 
     // Privacy and Security Settings
     o_torprefs.setBoolPref('block_disk', doc.getElementById('torbutton_blockDisk').checked);
+    // If we have NoScript enabled we set `noscript.volatilePrivatePermissions`
+    // to `true` if we are blocking disk records and to `false` if we are
+    // enabling them.
+    try {
+      if ("@maone.net/noscript-service;1" in Components.classes) {
+        let o_noscriptprefs = torbutton_get_prefbranch('noscript.');
+        if (o_torprefs.getBoolPref('block_disk')) {
+          o_noscriptprefs.setBoolPref('volatilePrivatePermissions', true);
+        } else {
+          o_noscriptprefs.setBoolPref('volatilePrivatePermissions', false);
+        }
+      }
+    } catch (e) {}
+
     o_torprefs.setBoolPref('resist_fingerprinting', doc.getElementById('torbutton_resistFingerprinting').checked);
     o_torprefs.setBoolPref('no_tor_plugins', doc.getElementById('torbutton_blockPlugins').checked);
     o_torprefs.setBoolPref('restrict_thirdparty', doc.getElementById('torbutton_restrictThirdParty').checked);





More information about the tor-commits mailing list