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.
This commit is contained in:
Vincent Petry 2013-11-06 17:37:35 +01:00
parent d490b8f972
commit 99e5c6f7eb

View file

@ -652,5 +652,10 @@ class OC_User {
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 . '/');
}
}