mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Validate cookie to prevent auth bypasses.
This commit is contained in:
parent
5192eecce2
commit
baab13ae13
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ elseif(OC_User::isLoggedIn()) {
|
|||
}
|
||||
// confirm credentials in cookie
|
||||
if(isset($_COOKIE['oc_token']) && OC_User::userExists($_COOKIE['oc_username']) &&
|
||||
OC_Preferences::getValue($_COOKIE['oc_username'], "login", "token") == $_COOKIE['oc_token']) {
|
||||
OC_Preferences::getValue($_COOKIE['oc_username'], "login", "token") === $_COOKIE['oc_token']) {
|
||||
OC_User::setUserId($_COOKIE['oc_username']);
|
||||
OC_Util::redirectToDefaultPage();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue