From c687d9074fa943ec3fec67a6b6ca29896c23c99b Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 22 Jul 2021 01:33:58 +0000 Subject: [PATCH 1/2] Make password limit 72 to match discord's limit --- src/routes/auth/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/auth/login.ts b/src/routes/auth/login.ts index 82cefae8..af00a46d 100644 --- a/src/routes/auth/login.ts +++ b/src/routes/auth/login.ts @@ -15,7 +15,7 @@ router.post( RateLimit({ count: 5, window: 60, onylIp: true }), check({ login: new Length(String, 2, 100), // email or telephone - password: new Length(String, 8, 64), + password: new Length(String, 8, 72), $undelete: Boolean, $captcha_key: String, $login_source: String, From ec9671a42908586a05357e5386b737a6c7752354 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 22 Jul 2021 01:35:24 +0000 Subject: [PATCH 2/2] Update register.ts --- src/routes/auth/register.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/auth/register.ts b/src/routes/auth/register.ts index 25c7b3dd..41798552 100644 --- a/src/routes/auth/register.ts +++ b/src/routes/auth/register.ts @@ -16,8 +16,8 @@ router.post( check({ username: new Length(String, 2, 32), // TODO: check min password length in config - // prevent Denial of Service with max length of 64 chars - password: new Length(String, 8, 64), + // prevent Denial of Service with max length of 72 chars + password: new Length(String, 8, 72), consent: Boolean, $email: new Length(Email, 5, 100), $fingerprint: String,