Skip to content
Snippets Groups Projects
Commit 2ea06f67 authored by Michael Göhler's avatar Michael Göhler
Browse files

delete all tokens on password change

parent 45f1c3f1
No related branches found
No related tags found
No related merge requests found
......@@ -552,9 +552,11 @@ class OC{
OC_Util::redirectToDefaultPage();
// doesn't return
}
// if you reach this point you are an attacker
// we remove all tokens to be save
OC_Preferences::deleteApp($_POST['user'], 'login_token');
// if you reach this point you have changed your password
// or you are an attacker
// we can not delete tokens here because users will reach
// this point multible times after a password change
//OC_Preferences::deleteApp($_POST['user'], 'login_token');
}
OC_User::unsetMagicInCookie();
return true;
......
......@@ -329,6 +329,8 @@ class OC_User {
}
}
}
// invalidate all login cookies
OC_Preferences::deleteApp($uid, 'login_token');
OC_Hook::emit( "OC_User", "post_setPassword", array( "uid" => $uid, "password" => $password ));
return $success;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment