I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 86525e72 authored by zzz's avatar zzz
Browse files

i2ptunnel: Strip top-level supercookies too

parent 29330aa5
No related branches found
No related tags found
No related merge requests found
...@@ -197,9 +197,10 @@ class HTTPResponseOutputStream extends FilterOutputStream { ...@@ -197,9 +197,10 @@ class HTTPResponseOutputStream extends FilterOutputStream {
} else if ("set-cookie".equals(lcKey)) { } else if ("set-cookie".equals(lcKey)) {
String lcVal = val.toLowerCase(Locale.US); String lcVal = val.toLowerCase(Locale.US);
if (lcVal.contains("domain=b32.i2p") || if (lcVal.contains("domain=b32.i2p") ||
lcVal.contains("domain=.b32.i2p")) { lcVal.contains("domain=.b32.i2p") ||
// Strip privacy-damaging "supercookie" for b32.i2p lcVal.contains("domain=i2p") ||
// Let's presume the user agent ignores a cookie for "i2p" lcVal.contains("domain=.i2p")) {
// Strip privacy-damaging "supercookies" for i2p and b32.i2p
// See RFC 6265 and http://publicsuffix.org/ // See RFC 6265 and http://publicsuffix.org/
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.INFO))
_log.info("Stripping \"" + key + ": " + val + "\" from response "); _log.info("Stripping \"" + key + ": " + val + "\" from response ");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment