mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-10-23 08:43:33 +00:00
Send the password-too-weak code with the weak password error
The frontend already translates that code, so the user no longer sees the untranslated server message.
This commit is contained in:
1 parent
5a649f0424
commit
fda8a00a50
1 file changed
+1
-2
@@ -144,11 +144,10 @@ pub(super) async fn register(
|
||||
}
|
||||
|
||||
if !password_manager.is_password_complex_enough(&form.password)? {
|
||||
// TODO localise this error
|
||||
state.add_error_on_field(
|
||||
RegisterFormField::Password,
|
||||
FieldError::Policy {
|
||||
code: None,
|
||||
code: Some("password-too-weak"),
|
||||
message: "Password is too weak".to_owned(),
|
||||
},
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user