diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-07 18:40:15 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-07 18:49:50 +0100 |
commit | 013444813e106dcc5ed45cb709696d5d6e24e89a (patch) | |
tree | fb9a1691859da717ac1d9fb0ea00df171c736fd4 /lib/private/user | |
parent | 3e916a9f1db72696681415797adad49db19b538b (diff) | |
download | nextcloud-server-013444813e106dcc5ed45cb709696d5d6e24e89a.tar.gz nextcloud-server-013444813e106dcc5ed45cb709696d5d6e24e89a.zip |
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
Diffstat (limited to 'lib/private/user')
-rw-r--r-- | lib/private/user/session.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/user/session.php b/lib/private/user/session.php index 525c65ab8a1..9c9bee3da25 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 . '/'); } } |