Skip to content

[bug] Weak Email Validation Pattern in Registration and Login Forms #1044

@vikram-2101

Description

@vikram-2101

Describe the bug
The email validation logic in the login and registration forms is too permissive. It currently uses a loose regex pattern (.+@.+..+) defined in the organization configuration, which fails to catch invalid TLDs or common domain typos. For example, the system accepts user@gmal.com as a valid email address without any warning or rejection.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to the Registration pageor Login page.
  2. Enter an email address with a common domain typo, such as vikramk2101@gmal.com.
  3. Observe that the form accepts the input as valid (the browser's built-in validation passes and no custom error is triggered).
  4. See that the invalid email is successfully submitted or displayed in the user's status after "login" as shown in the screenshot.

Expected behavior
The email field should implement a more robust validation pattern that:

Enforces a standard format with a valid TLD (e.g., [a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,}$).
(Bonus/Enhancement) Detects common domain typos (like gmal.com instead of gmail.com) and warns the user to prevent account recovery issues later.

Screenshots

Image

System Informatioon:

OS: Windows (WSL Ubuntu)
Node.js: v18
Browser: Chromium-based (Chrome/Edge)

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