From 60cf9016a9e6aa4180cd0a35f50300d0958e4f3c Mon Sep 17 00:00:00 2001
From: Hugo <hnouts.dev@gmail.com>
Date: Mon, 5 Jul 2021 18:45:21 +0200
Subject: [PATCH] fix regex

---
 src/users/users.service.ts | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/users/users.service.ts b/src/users/users.service.ts
index d02c4b13e..29ce842cc 100644
--- a/src/users/users.service.ts
+++ b/src/users/users.service.ts
@@ -57,9 +57,7 @@ export class UsersService {
    * @param password string
    */
   private isStrongPassword(password: string): boolean {
-    const strongRegex = new RegExp(
-      '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[*.! @#$%^&(){}[]:;<>,?/\\~_+-=|])(?=.{8,})'
-    ); //NOSONAR
+    const strongRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[*.! @#$%^&(){}\[\]:;<>,?\/\\~_+\-=|])(?=.{8,})/; //NOSONAR
     return strongRegex.test(password);
   }
 
-- 
GitLab