Skip to content

Commit b8c9192

Browse files
authored
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
1 parent 94bf1e3 commit b8c9192

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/users.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (api *API) postFirstUser(rw http.ResponseWriter, r *http.Request) {
148148
err = userpassword.Validate(createUser.Password)
149149
if err != nil {
150150
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
151-
Message: "Password not strong enough!",
151+
Message: "Password is invalid",
152152
Validations: []codersdk.ValidationError{{
153153
Field: "password",
154154
Detail: err.Error(),
@@ -448,7 +448,7 @@ func (api *API) postUser(rw http.ResponseWriter, r *http.Request) {
448448
err = userpassword.Validate(req.Password)
449449
if err != nil {
450450
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
451-
Message: "Password not strong enough!",
451+
Message: "Password is invalid",
452452
Validations: []codersdk.ValidationError{{
453453
Field: "password",
454454
Detail: err.Error(),

0 commit comments

Comments
 (0)