aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Login.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-03-31 09:51:16 +0700
committerGravatar Ugnich Anton2013-03-31 09:51:16 +0700
commit43299e7174718045d3804f0c3a3fd69a6fc16230 (patch)
treeb6dd99261bedb1cf37ac556351ee8cec689210ea /src/java/com/juick/http/www/Login.java
parent04492e5cd1996c71b05cade8a4205276ea205770 (diff)
Login cookies only for main domain
Diffstat (limited to 'src/java/com/juick/http/www/Login.java')
-rw-r--r--src/java/com/juick/http/www/Login.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/com/juick/http/www/Login.java b/src/java/com/juick/http/www/Login.java
index 79f626d0..3a715870 100644
--- a/src/java/com/juick/http/www/Login.java
+++ b/src/java/com/juick/http/www/Login.java
@@ -81,7 +81,6 @@ public class Login {
if (com.juick.server.UserQueries.getUIDbyHash(sql, hash) > 0) {
Cookie c = new Cookie("hash", hash);
- c.setDomain(".juick.com");
c.setMaxAge(365 * 24 * 60 * 60);
response.addCookie(c);
@@ -103,7 +102,6 @@ public class Login {
if (uid > 0) {
String hash = com.juick.server.UserQueries.getHashByUID(sql, uid);
Cookie c = new Cookie("hash", hash);
- c.setDomain(".juick.com");
c.setMaxAge(365 * 24 * 60 * 60);
response.addCookie(c);
@@ -138,6 +136,10 @@ public class Login {
c.setMaxAge(0);
response.addCookie(c);
+ Cookie c2 = new Cookie("hash", "-");
+ c2.setMaxAge(0);
+ response.addCookie(c2);
+
response.sendRedirect("/");
}
}