Merge branch 'master' into adminarea-creation-transactionlist-show

This commit is contained in:
Ulf Gebhardt 2022-03-07 16:24:29 +01:00 committed by GitHub
commit 31721337ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -592,6 +592,13 @@ export class UserResolver {
}
if (password && passwordNew) {
// Validate Password
if (!isPassword(passwordNew)) {
throw new Error(
'Please enter a valid password with at least 8 characters, upper and lower case letters, at least one number and one special character!',
)
}
// TODO: This had some error cases defined - like missing private key. This is no longer checked.
const oldPasswordHash = SecretKeyCryptographyCreateKey(userEntity.email, password)
if (BigInt(userEntity.password.toString()) !== oldPasswordHash[0].readBigUInt64LE()) {