Error is not highlighted when username is correct, but not enough characters in password

AI-generated summary

Users are reporting a bug during the initial admin account creation on self-hosted Discourse instances, where password validation errors (e.g., insufficient length) are not visually highlighted or displayed, despite the form failing to submit. featheredtoast first documented this behavior, showing that while errors like ‘can’t be blank’ appear for empty fields, they lack red highlighting — and for short passwords, no error is shown at all. arun initially confused this with the standard signup flow, but featheredtoast clarified this is the separate admin setup screen shown post-installation. asa confirmed experiencing the same issue weeks earlier. lindsey attempted to reproduce the bug on a trial site but could not, noting that on hosted instances, the Continue button is simply disabled without errors — suggesting the bug is specific to self-hosted setups. chapoi aggregated additional reports from Meta, confirming this is a recurring issue. The bug has been addressed in PR #36672 by zogstrip, who added system tests to improve coverage. The fix ensures proper error messaging and visual highlighting for invalid passwords during admin signup.

When registering a new forum, there’s a few inconsistencies in how Discourse displays errors when signing up.

With blank username and password:

When username entered, but password field is blank, can’t be blank error is shown, but input is not highlighted:

When registering with less than required characters, there are no red highlights and also no errors:

6 Likes

So I can understand better, is this referring to user creation on a forum or a different signup? I am seeing a different screen when creating an user:

This is the initial admin account creation screen, which is slightly different than the normal signup form

I had the same problem when creating my administrator accounts 3 weeks ago. I chose a password under 15 characters, but there was no error message, and I had to puzzle over it. After I chose a longer password, the account was created.

@featheredtoast I’m trying to reproduce this and I’m having some trouble.

When I spun up a new trial site, I couldn’t reproduce any of these errors.

  • No errors are shown when you have blank username / password; the Continue button is disabled.
  • No error is shown when username is entered and password is blank; same thing as above — the Continue button remains disabled.
  • I see an informative error when my password is too short.

This is just a new trial through the /pricing page. Where are you seeing you errors?

Sorry if it’s not clear - this is the initial signup given to an admin signup, I believe this is only available through a self-hosted site, not one through Discourse’s hosting.

There’s a completely separate sign up form after you get the “congratulations you installed Discourse”, this is the full screenshot of the signup page in question:

2 Likes

We just got a few more mentions of this issue:

Collecting them here.

3 Likes

Will be fixed by

https://github.com/discourse/discourse/pull/36672

Took the time to increase coverage by adding a system spec as well :+1:

4 Likes