Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Bug in Validations.py under "validate_user" function #37272

Description

@k-naula97

Issue is with the behavior of "validate_user" function in validations.py.
This script should validate usernames if they start with a letter only.

to fix this issue change:
if not re.match('^[a-z0-9._]*$', username) AND if username[0].isnumeric():

it should be:

if not re.match(r'^[A-Za-z0-9._]*$', username)
if not username[0].isalpha():

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions