From 8c4134c8adc0430f5d17ee350e769ee5b0415f55 Mon Sep 17 00:00:00 2001 From: Cam Otts Date: Mon, 22 May 2023 14:24:54 -0500 Subject: [PATCH] checks against top password field rather than bottom --- ui/src/components/password.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/components/password.js b/ui/src/components/password.js index 836701f1..8e67f421 100644 --- a/ui/src/components/password.js +++ b/ui/src/components/password.js @@ -15,20 +15,20 @@ const PasswordForm = (props) => { if (confirm === "" && password === "") { return } - if (confirm.length < props.passwordLength) { + if (password.length < props.passwordLength) { props.setMessage(passwordTooShortMessage) return; } - if (props.passwordRequireCapital && !/[A-Z]/.test(confirm)) { + if (props.passwordRequireCapital && !/[A-Z]/.test(password)) { props.setMessage(passwordRequiresCapitalMessage) return; } - if (props.passwordRequireNumeric && !/\d/.test(confirm)) { + if (props.passwordRequireNumeric && !/\d/.test(password)) { props.setMessage(passwordRequiresNumericMessage) return; } if (props.passwordRequireSpecial) { - if (!props.passwordValidSpecialCharacters.split("").some(v => confirm.includes(v))) { + if (!props.passwordValidSpecialCharacters.split("").some(v => password.includes(v))) { props.setMessage(passwordRequiresSpecialMessage) return; }