mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-21 15:59:48 +01:00
Unify password validation (#2077)
Passwords should be checked when created or changed in the frontend just as they are in the backend for REST and CLI. Also extend the password validation to allow upto 1024 characters instead of 32. Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
This commit is contained in:
@@ -50,7 +50,7 @@ const PasswordConfirmation: FC<InnerProps> = ({ passwordChanged, passwordValidat
|
||||
return passwordValidator(newPassword);
|
||||
}
|
||||
|
||||
return newPassword.length >= 6 && newPassword.length < 32;
|
||||
return newPassword.length >= 6 && newPassword.length < 1024;
|
||||
};
|
||||
|
||||
const handlePasswordValidationChange = (newConfirmedPassword: string) => {
|
||||
@@ -76,7 +76,7 @@ const PasswordConfirmation: FC<InnerProps> = ({ passwordChanged, passwordValidat
|
||||
<InputField
|
||||
label={t("password.newPassword")}
|
||||
type="password"
|
||||
onChange={event => handlePasswordChange(event)}
|
||||
onChange={(event) => handlePasswordChange(event)}
|
||||
value={password}
|
||||
validationError={!passwordValid}
|
||||
errorMessage={t("password.passwordInvalid")}
|
||||
|
||||
Reference in New Issue
Block a user