Explorar o código

Fixed issue with password RegEx.

KrisVos130 %!s(int64=8) %!d(string=hai) anos
pai
achega
cef5134512
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      backend/logic/db/index.js

+ 1 - 1
backend/logic/db/index.js

@@ -8,7 +8,7 @@ const regex = {
 	azAZ09_: /^[A-Za-z0-9_]+$/,
 	az09_: /^[a-z0-9_]+$/,
 	emailSimple: /^[\x00-\x7F]+@[a-z0-9]+\.[a-z0-9]+(\.[a-z0-9]+)?$/,
-	password: /[a-z]+[A-Z]+[0-9]+[^a-zA-Z0-9]+/,
+	password: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]/,
 	ascii: /^[\x00-\x7F]+$/
 };