diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-08-12 00:20:36 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-08-12 00:20:36 +1000 |
commit | c0614b18c3696d956978de557a0ec36ab3e18dda (patch) | |
tree | e7d3bfe702afb285cf02d70c234fe027c6e8e292 /src/api | |
parent | set rules/updates in guild if we created them (diff) | |
download | server-c0614b18c3696d956978de557a0ec36ab3e18dda.tar.xz |
fix min password length check
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/routes/auth/register.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts index 14dc319a..c92ebfe0 100644 --- a/src/api/routes/auth/register.ts +++ b/src/api/routes/auth/register.ts @@ -225,9 +225,8 @@ router.post( } if (body.password) { - const min = register.password.minLength - ? register.password.minLength - : 8; + const min = register.password.minLength ?? 8; + if (body.password.length < min) { throw FieldErrors({ password: { |