Skip to content

Just update password hash without validating#11568

Merged
MorrisJobke merged 1 commit intomasterfrom
fix/11097/just_update_password_hash
Oct 3, 2018
Merged

Just update password hash without validating#11568
MorrisJobke merged 1 commit intomasterfrom
fix/11097/just_update_password_hash

Conversation

@rullzer
Copy link
Member

@rullzer rullzer commented Oct 2, 2018

Fixes #11097

If your password hash changed (becuse your are on 7.2 and we moved to
ARGON2). Then we shold not 'set a new password' but just update the
hash. As else we invoke the password policy again which might lock out
users.

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

if (\OC::$server->getHasher()->verify($password, $storedHash, $newHash)) {
if (!empty($newHash)) {
$this->setPassword($uid, $password);
$qb = $this->dbConn->getQueryBuilder()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a bool $silent param instead? I'm not a big fan of this duplication.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough. Extracted the logic to a function

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better 👍 😄

Fixes #11097

If your password hash changed (becuse your are on 7.2 and we moved to
ARGON2). Then we shold not 'set a new password' but just update the
hash. As else we invoke the password policy again which might lock out
users.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer force-pushed the fix/11097/just_update_password_hash branch from e107585 to 0c9a3de Compare October 2, 2018 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants