From 8ef25014071814548f2e71d4aedee2d0a8ed7b72 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:58:05 +0200 Subject: [PATCH] Fix: `null` `null` firstName and lastName allowed during signup --- frontend/src/pages/signupinvite.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/signupinvite.tsx b/frontend/src/pages/signupinvite.tsx index 17ac5b4ff..a0c2f2430 100644 --- a/frontend/src/pages/signupinvite.tsx +++ b/frontend/src/pages/signupinvite.tsx @@ -75,7 +75,12 @@ export default function SignupInvite() { // Verifies if the information that the users entered (name, workspace) is there, and if the password matched the criteria. const signupErrorCheck = async () => { setIsLoading(true); - let errorCheck = false; + + let errorCheck = await checkPassword({ + password, + setErrors + }); + if (!firstName) { setFirstNameError(true); errorCheck = true; @@ -89,11 +94,6 @@ export default function SignupInvite() { setLastNameError(false); } - errorCheck = await checkPassword({ - password, - setErrors - }); - if (!errorCheck) { // Generate a random pair of a public and a private key const pair = nacl.box.keyPair();