summary refs log tree commit diff
diff options
context:
space:
mode:
authorngn13 <78868991+ngn13@users.noreply.github.com>2023-06-10 22:13:44 +0300
committerGitHub <noreply@github.com>2023-06-10 22:13:44 +0300
commit9efe160340a90e5635ad018f22942c6ce3c08b62 (patch)
treec574bd7c118cabf493439a2f31b1642ade4e741c
parentImplemented password length check (diff)
downloadserver-9efe160340a90e5635ad018f22942c6ce3c08b62.tar.xz
making min password length configurable
Co-authored-by: Puyodead1 <puyodead@proton.me>
-rw-r--r--src/api/routes/auth/register.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts
index 7b62f621..f8bc6da2 100644
--- a/src/api/routes/auth/register.ts
+++ b/src/api/routes/auth/register.ts
@@ -225,7 +225,7 @@ router.post(
 		}
 
 		if (body.password) {
-                        if(body.password.length<8){
+                        if(body.password.length < register.password.minLength){
                                 throw FieldErrors({
                                         password: {
                                                 code: "PASSWORD_REQUIREMENTS_MIN_LENGTH",