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 99e5c6f7eb
This commit is contained in:
Vincent Petry 2013-11-07 18:40:15 +01:00
parent 3e916a9f1d
commit 013444813e
1 changed files with 5 additions and 0 deletions

View File

@ -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 . '/');
}
}