[tor-commits] [torbutton/master] Bug #3819: Fix an API issue w/ cookie protections
mikeperry at torproject.org
mikeperry at torproject.org
Fri Aug 26 20:30:18 UTC 2011
commit 681f70905989ca77ddc29b0208dc0e11751b8641
Author: Mike Perry <mikeperry-git at fscked.org>
Date: Fri Aug 26 13:26:14 2011 -0700
Bug #3819: Fix an API issue w/ cookie protections
The cookie protections API I used in "New Identity" would do nothing if you
had no protected cookies.
I don't believe this issue affected 1.4.0, though.
---
src/components/cookie-jar-selector.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/components/cookie-jar-selector.js b/src/components/cookie-jar-selector.js
index 5c5011a..e26493f 100644
--- a/src/components/cookie-jar-selector.js
+++ b/src/components/cookie-jar-selector.js
@@ -364,8 +364,11 @@ function CookieJarSelector() {
try {
var cookiesAsXml = this.getProtectedCookies(name);
if (cookiesAsXml == null || typeof(cookiesAsXml) == "undefined"
- || cookiesAsXml.toString() == "")
- return;//file does not exist - no protected cookies
+ || cookiesAsXml.toString() == "") {
+ //file does not exist - no protected cookies. Clear them all.
+ this.clearCookies();
+ return;
+ }
var cookiemanager =
Cc["@mozilla.org/cookiemanager;1"]
.getService(Ci.nsICookieManager2);
More information about the tor-commits
mailing list