0
Fork 0
mirror of https://github.com/stonith404/pingvin-share.git synced 2025-01-15 01:14:27 -05:00

fix: password can be changed with wrong password

This commit is contained in:
Elias Schneider 2024-01-14 14:14:07 +01:00
parent 067652aa80
commit 0ccb836444
No known key found for this signature in database
GPG key ID: 07E623B294202B6C

View file

@ -139,7 +139,7 @@ export class AuthService {
async updatePassword(user: User, newPassword: string, oldPassword?: string) {
const isPasswordValid =
!user.password || !(await argon.verify(user.password, oldPassword));
!user.password || await argon.verify(user.password, oldPassword);
if (!isPasswordValid) throw new ForbiddenException("Invalid password");