[BUG] User registration email format is not enforced in API #133

Closed
opened 2026-02-04 17:59:47 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @bo0tzz on GitHub (Jul 6, 2022).

Originally assigned to: @jbaez on GitHub.

When registering a user and signing in, you are expected to enter an email address for the user. The various forms enforce that this should be an email address, but the backend API does not. With a (manual) request to the API, it is possible to create an account with an invalid email address. It is then impossible to log in with this user, as the login form enforces the email address format.
I see two possible solutions:

a. Remove all email address validation, and allow using any username (my preference)
b. Enforce the email address validation at the API layer

Either way, I would remove the validation from the login form specifically, to prevent any chance of a lockout.

Originally created by @bo0tzz on GitHub (Jul 6, 2022). Originally assigned to: @jbaez on GitHub. When registering a user and signing in, you are expected to enter an email address for the user. The various forms enforce that this should be an email address, but the backend API does not. With a (manual) request to the API, it is possible to create an account with an invalid email address. It is then impossible to log in with this user, as the login form enforces the email address format. I see two possible solutions: a. Remove all email address validation, and allow using any username (my preference) b. Enforce the email address validation at the API layer Either way, I would remove the validation from the login form specifically, to prevent any chance of a lockout.
Author
Owner

@jbaez commented on GitHub (Jul 14, 2022):

We've discussed this internally, and for the time being we are going to enforce email address for registering users 🙂.
There is a considerable amount of work for switching to username.
We will be adding email validation in the API.

@jbaez commented on GitHub (Jul 14, 2022): We've discussed this internally, and for the time being we are going to enforce email address for registering users 🙂. There is a considerable amount of work for switching to username. We will be adding email validation in the API.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#133