[tor-bugs] #28917 [Circumvention/Snowflake]: Delete the proxy opt-in cookie, don't set it to 0
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Jul 31 16:55:43 UTC 2019
#28917: Delete the proxy opt-in cookie, don't set it to 0
-------------------------------------+-------------------------
Reporter: dcf | Owner: arlolra
Type: enhancement | Status: closed
Priority: Medium | Milestone:
Component: Circumvention/Snowflake | Version:
Severity: Normal | Resolution: fixed
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------+-------------------------
Changes (by arlolra):
* status: assigned => closed
* resolution: => fixed
Comment:
This was fixed in #27385
https://gitweb.torproject.org/pluggable-
transports/snowflake.git/commit/?id=e60f22833af9050cafef5ab00931c0c69867130a
{{{
+// Defaults to opt-in.
+var COOKIE_NAME = "snowflake-allow";
+var COOKIE_LIFETIME = "Thu, 01 Jan 2038 00:00:00 GMT";
+var COOKIE_EXPIRE = "Thu, 01 Jan 1970 00:00:01 GMT";
+
+function setSnowflakeCookie(val, expires) {
+ document.cookie = `${COOKIE_NAME}=${val}; path=/; expires=${expires};`;
+}
...
+ document.getElementById('enabled').addEventListener('change', (event)
=> {
+ if (event.target.checked) {
+ setSnowflakeCookie('1', COOKIE_LIFETIME);
+ } else {
+ setSnowflakeCookie('', COOKIE_EXPIRE);
+ }
+ update();
+ })
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28917#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list