mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
fix(core): Password reset should pass in the correct values to external hooks (#5842)
This commit is contained in:
committed by
GitHub
parent
d0788ee8e1
commit
5bcab8fcbe
@@ -255,8 +255,10 @@ export class PasswordResetController {
|
||||
throw new NotFoundError('');
|
||||
}
|
||||
|
||||
const passwordHash = await hashPassword(validPassword);
|
||||
|
||||
await this.userRepository.update(userId, {
|
||||
password: await hashPassword(validPassword),
|
||||
password: passwordHash,
|
||||
resetPasswordToken: null,
|
||||
resetPasswordTokenExpiration: null,
|
||||
});
|
||||
@@ -279,6 +281,6 @@ export class PasswordResetController {
|
||||
});
|
||||
}
|
||||
|
||||
await this.externalHooks.run('user.password.update', [user.email, password]);
|
||||
await this.externalHooks.run('user.password.update', [user.email, passwordHash]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user