Skip to content

[BUG] User email address uniqueness is only enforced case-sensitive #1103

Description

@SilPan

Describe the bug
A users email address is checked for uniqueness during creation, but in a case-sensitive way.
Email addresses are case-insensitive tough.

Users with the email addresses e.g.
John.Doe@company.tld
and
john.doe@company.tld
can exist.

Strictly following RFC 5321, the local part of an email address is even case-sensitive.
But in reality everybody assumes, and all major mail providers treat email addresses as case-insensitive.

To Reproduce
Steps to reproduce the behavior:

  1. Create new user with email address: John.Doe@company.tld
  2. Create new user with email address: john.doe@company.tld
  3. Observe in the list of users, that you have two with the same email address.

Expected behavior
Uniqueness of email addresses of users is already checked and a (psycopg2.errors.ForeignKeyViolation) update or delete on table "user" violates foreign key constraint "user_client_user_id_fkey" on table "user_client" is thrown.
This check should be performed case-insensitive.

Desktop (please complete the following information):

  • Browser Firefox 140.13.0. ESR
  • Version v2.4.27

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions