From b49a8b84db4f286a894abe2d19db32764c89bbcb Mon Sep 17 00:00:00 2001 From: martmull Date: Fri, 26 Jan 2024 12:11:46 +0100 Subject: [PATCH] Remove error when new_psw==old_psw (#3637) --- packages/twenty-server/src/core/auth/services/auth.service.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/twenty-server/src/core/auth/services/auth.service.ts b/packages/twenty-server/src/core/auth/services/auth.service.ts index 7d3940219..660cd44e0 100644 --- a/packages/twenty-server/src/core/auth/services/auth.service.ts +++ b/packages/twenty-server/src/core/auth/services/auth.service.ts @@ -259,10 +259,6 @@ export class AuthService { assert(isPasswordValid, 'Password too weak', BadRequestException); - const isPasswordSame = await compareHash(newPassword, user.passwordHash); - - assert(!isPasswordSame, 'Password cannot be repeated', BadRequestException); - const newPasswordHash = await hashPassword(newPassword); await this.userRepository.update(userId, {