pnpm@10.7, node@23, argon->@node-rs/argon2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as argon2 from "argon2";
|
||||
import { hash } from '@node-rs/argon2';
|
||||
import { passwordStrength } from "check-password-strength";
|
||||
import { IsBoolean, IsEmail, IsInt, IsNotEmpty, IsOptional, IsPhoneNumber, IsString, IsUrl } from 'class-validator';
|
||||
import { getConnectionManager } from 'typeorm';
|
||||
@@ -111,7 +111,7 @@ export class UpdateUser {
|
||||
if (!password_strength.contains.includes("lowercase")) { throw new PasswordMustContainLowercaseLetterError(); }
|
||||
if (!password_strength.contains.includes("number")) { throw new PasswordMustContainNumberError(); }
|
||||
if (!(password_strength.length > 9)) { throw new PasswordTooShortError(); }
|
||||
user.password = await argon2.hash(this.password + user.uuid);
|
||||
user.password = await hash(this.password + user.uuid);
|
||||
user.refreshTokenCount = user.refreshTokenCount + 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user