[tor-commits] [flashproxy/master] Use boolean value for the cookie.

dcf at torproject.org dcf at torproject.org
Fri Dec 28 14:13:54 UTC 2012


commit 3a4d9af597e6ec0a48e830e6421048d45bc76eec
Author: David Fifield <david at bamsoftware.com>
Date:   Wed Dec 19 17:21:15 2012 -0800

    Use boolean value for the cookie.
    
    Instead of relying on simple presence/absence, use a value of 1 or 0.
---
 proxy/options.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/options.js b/proxy/options.js
index 8382240..c9a8713 100644
--- a/proxy/options.js
+++ b/proxy/options.js
@@ -16,11 +16,11 @@ function add_event(elem, evt, handler) {
 }
 
 function set_cookie_allowed() {
-    document.cookie = COOKIE_NAME + "= ;path=/ ;expires=" + COOKIE_LIFETIME;
+    document.cookie = COOKIE_NAME + "=1;path=/ ;expires=" + COOKIE_LIFETIME;
 }
 
 function set_cookie_disallowed() {
-    document.cookie = COOKIE_NAME + "= ;path=/ ;expires=Thu, 01 Jan 1970 00:00:00 GMT";
+    document.cookie = COOKIE_NAME + "=0;path=/ ;expires=" + COOKIE_LIFETIME;
 }
 
 add_event(window, "load", function () {





More information about the tor-commits mailing list