commit 5a1ba687b4bf9666efa69d29ffad2a4aefcec13a Author: Mike Perry mikeperry-git@fscked.org Date: Mon Jun 20 18:12:02 2011 -0700
Bug 3177: Update torbutton for new TorBrowser prefs.
Turns out there's just one that makes sense to set right now. --- src/chrome/content/torbutton.js | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index 720e281..08cb506 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -1594,6 +1594,16 @@ function torbutton_update_status(mode, force_update) { m_tb_prefs.setIntPref("security.OCSP.enabled", 0); m_tb_prefs.setIntPref("security.OCSP.enabled", ocsp);
+ // This clears the STS cache and site permissions on Tor Browser + // XXX: Tie to some kind of disk-ok pref? + try { + m_tb_prefs.setBoolPref('permissions.memory_only', mode); + } catch(e) { + // Actually, this catch does not appear to be needed. Leaving it in for + // safety though. + torbutton_log(3, "Can't clear STS/Permissions: Not Tor Browser: "+e); + } + // This clears the undo tab history. var tabs = m_tb_prefs.getIntPref("browser.sessionstore.max_tabs_undo"); m_tb_prefs.setIntPref("browser.sessionstore.max_tabs_undo", 0);