@@ -194,7 +194,7 @@ pub enum RouteError {
194
194
NoPassword ,
195
195
196
196
#[ error( "password verification failed" ) ]
197
- PasswordVerificationFailed ,
197
+ PasswordMismatch ,
198
198
199
199
#[ error( "request rate limited" ) ]
200
200
RateLimited ( #[ from] PasswordCheckLimitedError ) ,
@@ -248,13 +248,11 @@ impl IntoResponse for RouteError {
248
248
error : "Missing property 'identifier" ,
249
249
status : StatusCode :: BAD_REQUEST ,
250
250
} ,
251
- Self :: UserNotFound | Self :: NoPassword | Self :: PasswordVerificationFailed => {
252
- MatrixError {
253
- errcode : "M_FORBIDDEN" ,
254
- error : "Invalid username/password" ,
255
- status : StatusCode :: FORBIDDEN ,
256
- }
257
- }
251
+ Self :: UserNotFound | Self :: NoPassword | Self :: PasswordMismatch => MatrixError {
252
+ errcode : "M_FORBIDDEN" ,
253
+ error : "Invalid username/password" ,
254
+ status : StatusCode :: FORBIDDEN ,
255
+ } ,
258
256
Self :: LoginTookTooLong => MatrixError {
259
257
errcode : "M_FORBIDDEN" ,
260
258
error : "Login token expired" ,
@@ -607,7 +605,7 @@ async fn user_password_login(
607
605
}
608
606
PasswordVerificationResult :: Success ( None ) => { }
609
607
PasswordVerificationResult :: Failure => {
610
- return Err ( RouteError :: PasswordVerificationFailed ) ;
608
+ return Err ( RouteError :: PasswordMismatch ) ;
611
609
}
612
610
}
613
611
0 commit comments