From b8c9192d0bee03574d4372ee168d816419188a1a Mon Sep 17 00:00:00 2001 From: Andrew Aquino Date: Mon, 11 Aug 2025 15:20:02 -0400 Subject: [PATCH] fix: generalize password invalid message (#19307) fixes #19044 password over 64 characters means it's _too_ strong; now the error message is applicable to this case --- coderd/users.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coderd/users.go b/coderd/users.go index 851c52d711..d38d40a1fc 100644 --- a/coderd/users.go +++ b/coderd/users.go @@ -148,7 +148,7 @@ func (api *API) postFirstUser(rw http.ResponseWriter, r *http.Request) { err = userpassword.Validate(createUser.Password) if err != nil { httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{ - Message: "Password not strong enough!", + Message: "Password is invalid", Validations: []codersdk.ValidationError{{ Field: "password", Detail: err.Error(), @@ -448,7 +448,7 @@ func (api *API) postUser(rw http.ResponseWriter, r *http.Request) { err = userpassword.Validate(req.Password) if err != nil { httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{ - Message: "Password not strong enough!", + Message: "Password is invalid", Validations: []codersdk.ValidationError{{ Field: "password", Detail: err.Error(),