Skip to content

[LDAP-Authentication] Special Characters #4434

Closed
@neurolag

Description

@neurolag
  • Gitea version (or commit ref): c784ac5
  • Git version: 2.7.4
  • Operating system: Linux 4.4.0-042stab130.1 #1 SMP Tue May 22 09:19:34 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL MariaDB
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log:
2018/07/12 13:13:30 [W] Failed to login '~Tutti~' via 'RomHackersWorld': Invalid pattern for attribute 'username' [~Tutti~]: must be valid alpha or numeric or dash(-_) or dot characters

https://github.com/go-gitea/gitea/blob/master/models/login_source.go#L405-L407

Description

Some members of our community (our community-leader, for example) have special characters in their username which natively is supported by LDAP and also gitea.
His username, for example, is ~Tutti~.

When logging in a strange error message appears (see screenshot below).
The user isn't migrated and is unable to log in.

I think the way to check the username when logging in via LDAP should be changed a little.
Thanks for the support in advance

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions