Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: password check (#13684)

ecmadao47c590f9bc9c
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.go
index 309f3caa54..41c68c8ad1 100644
--- a/backend/api/v1/auth_service.go
+++ b/backend/api/v1/auth_service.go
@@ -43,7 +43,7 @@ type CreateUserFunc func(ctx context.Context, user *store.UserMessage, firstEndU
var (
invalidUserOrPasswordError = status.Errorf(codes.Unauthenticated, "The email or password is not valid.")
- passwordValidRegex = regexp2.MustCompile(`^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[\w~@#$%^&*+=|{}:;!.?\"()\[\]-]{8,}`, 0)
+ passwordValidRegex = regexp2.MustCompile(`^(?=.*\d)(?=.*[a-zA-Z])[\w~@#$%^&*+=|{}:;!.?\"()\[\]-]{8,}$`, 0)
)
// AuthService implements the auth service.
diff --git a/frontend/src/components/User/Settings/CreateUserDrawer.vue b/frontend/src/components/User/Settings/CreateUserDrawer.vue
index 75b0593067..358aeff9f3 100644
--- a/frontend/src/components/User/Settings/CreateUserDrawer.vue
+++ b/frontend/src/components/User/Settings/CreateUserDrawer.vue
@@ -275,9 +275,8 @@ const checkPassword = () => {
return;
}
state.passwordHint =
- !/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[\w~@#$%^&*+=`|{}:;!.?\"()\[\]-]{8,}/.test(
- pwd
- );
+ // eslint-disable-next-line no-useless-escape
+ !/^(?=.*\d)(?=.*[a-zA-Z])[\w~@#$%^&*+=|{}:;!.?\"()\[\]-]{8,}$/.test(pwd);
return;
};