aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/password.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-12-23 14:11:11 +0100
committerGitHub <noreply@github.com>2022-12-23 14:11:11 +0100
commitf762ce1050f2add409a83b1eeb6da5940177cfa7 (patch)
treec19463642a73bbb8b367e3d11fd734f78cfeac31 /clientapi/routing/password.go
parentf47515e38b0bbf734bf977daedd836bf85465272 (diff)
Add clientapi tests (#2916)
This PR - adds several tests for the clientapi, mostly around `/register` and auth fallback. - removes the now deprecated `homeserver` field from responses to `/register` and `/login` - slightly refactors auth fallback handling
Diffstat (limited to 'clientapi/routing/password.go')
-rw-r--r--clientapi/routing/password.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/clientapi/routing/password.go b/clientapi/routing/password.go
index cd88b025..f7f9da62 100644
--- a/clientapi/routing/password.go
+++ b/clientapi/routing/password.go
@@ -82,8 +82,8 @@ func Password(
sessions.addCompletedSessionStage(sessionID, authtypes.LoginTypePassword)
// Check the new password strength.
- if resErr = internal.ValidatePassword(r.NewPassword); resErr != nil {
- return *resErr
+ if err := internal.ValidatePassword(r.NewPassword); err != nil {
+ return *internal.PasswordResponse(err)
}
// Get the local part.