From 013444813e106dcc5ed45cb709696d5d6e24e89a Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 7 Nov 2013 18:40:15 +0100 Subject: [PATCH] Now removing stray old cookies from 5.0.12 Cookies from 5.0.12 seemed to have an extra slash in the path. Firefox doesn't allow to remove them if the trailing slash isn't there, thus making it impossible to logout correctly. This fix adds extra code to delete such stray cookies. Ported from stable5 branch 99e5c6f7eb58404be2cc5448ec380f29c9a71225 --- lib/private/user/session.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/user/session.php b/lib/private/user/session.php index 525c65ab8a..9c9bee3da2 100644 --- a/lib/private/user/session.php +++ b/lib/private/user/session.php @@ -170,5 +170,10 @@ class Session implements Emitter, \OCP\IUserSession { setcookie('oc_username', '', time()-3600, \OC::$WEBROOT); setcookie('oc_token', '', time()-3600, \OC::$WEBROOT); setcookie('oc_remember_login', '', time()-3600, \OC::$WEBROOT); + // old cookies might be stored under /webroot/ instead of /webroot + // and Firefox doesn't like it! + setcookie('oc_username', '', time()-3600, \OC::$WEBROOT . '/'); + setcookie('oc_token', '', time()-3600, \OC::$WEBROOT . '/'); + setcookie('oc_remember_login', '', time()-3600, \OC::$WEBROOT . '/'); } }