No custom fields should appear after "Password" on signup?

AI-generated summary

A discussion about custom fields on the Discourse signup form has led to a change to prevent users from accidentally pasting their password into a custom field. supermathie proposed the idea after a user mistakenly pasted their password into a “Pronouns” field, thinking it was a “password confirmation” field. A validation has been implemented by @nbianca sam to reject signups if the password is entered into a custom field. There is also a suggestion to apply this validation to emails, but sam wants to see it fail in the real world before making a change. However, a change to check that the password is not the email is supported.

On a forum with a custom “Pronouns” field enabled, at least one user accidentally pasted their password into the “Pronouns” box.

Presumably they were running on autopilot and pasted their password thinking it was a “password confirmation” field like we’ve been conditioned to do over the last [too many] years.

Perhaps we could help people avoid this mistake by preventing any custom fields appearing after the “Password” field.

Or, run custom fields to ensure they aren’t the user’s password… kind of a weirdly-specific thing to check though. :person_shrugging:

Exhibit A: meta’s signup form:

13 Likes

Quick update… @nbianca just implemented a validation here:

https://github.com/discourse/discourse/commit/dc89b72d465329b041b0b26be4e6176343288176

This means that we will simply reject signups in future if people make this mistake.

Longer term there may be something better we can do in the UI to avoid this upfront, but the big vector here is now sealed.

7 Likes

Can this apply to emails too?

Great suggestion, but I would like to see this fail in the real world before rushing to fix. The position of email makes this less likely to happen.

I can imagine cases where people include emails in custom fields and they happen to be the same email you registered.

I guess a change I support is “check the password/name/username is not the email” - do we have that covered @nbianca ?

2 Likes

Yep. Definitely a few times I have entered the password because I expect a “Confirm your password” prompt, but it’s just a custom field.

1 Like