Skip to content

ErrNameCharsNotAllowed is raised even though username is possible #11522

Closed
@DasRoteSkelett

Description

@DasRoteSkelett
  • Gitea version (or commit ref): master (0903b1a)
  • Git version: 2.25.1
  • Operating system: Ubuntu 20.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    2020/05/20 12:46:17 ...dels/login_source.go:804:UserSignIn() [W] Failed to login 'matthias.schöpfer' via 'ithinx ldap': User name is invalid [Matthias.Schöpfer]: must be valid alpha or numeric or dash(-_) or dot characters

Description

One of my former, brain dead administrators gave me a username containing a special german letter. Now, ldap will not function because my user name gets rejected by gitea.

To my understanding, in user.go, line 92 / 93 must be patched for that to work:
// Characters prohibited in a user name (anything except A-Za-z0-9_.-) alphaDashDotPattern = regexp.MustCompile(``[^\w-\.]``)
I do not know how go works, so this will probably not be a big deal I guess?!

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