mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Make password-reset urls valid only for single-use (#7622)
This commit is contained in:
committed by
GitHub
parent
b3470fd64d
commit
60314248f4
@@ -411,23 +411,8 @@ export class UsersController {
|
||||
throw new NotFoundError('User not found');
|
||||
}
|
||||
|
||||
const resetPasswordToken = this.jwtService.signData(
|
||||
{ sub: user.id },
|
||||
{
|
||||
expiresIn: '1d',
|
||||
},
|
||||
);
|
||||
|
||||
const baseUrl = getInstanceBaseUrl();
|
||||
|
||||
const link = this.userService.generatePasswordResetUrl(
|
||||
baseUrl,
|
||||
resetPasswordToken,
|
||||
user.mfaEnabled,
|
||||
);
|
||||
return {
|
||||
link,
|
||||
};
|
||||
const link = this.userService.generatePasswordResetUrl(user);
|
||||
return { link };
|
||||
}
|
||||
|
||||
@Authorized(['global', 'owner'])
|
||||
|
||||
Reference in New Issue
Block a user