Skip to content

Gitea rejects usernames from LDAP which contain ".-" #31475

Open
@matrss

Description

@matrss

Description

The central AD instance in our organization provides usernames that contain ".-" for people with e.g. hyphenated first names. This is outside of my control. In the past, Gitea allowed these usernames, but since some point (#20136 I'd guess) this is no longer the case.

Since I am not able to change what is given to me as a username this means that people with these names are currently unable to login for the first time (i.e. when they don't have an account yet).

While there is probably some merit to the enforced rules on usernames, I think there should be an option to overrule those specifically for external authentication sources. Alternatively, there should be some mechanism to convert the provided usernames into something Gitea accepts, automatically.

Gitea Version

v1.20.5 (yes, outdated, working on it)

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker compose

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions