Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LDAP-Authentication] Special Characters #4434

Closed
2 of 7 tasks
manuth opened this issue Jul 12, 2018 · 5 comments
Closed
2 of 7 tasks

[LDAP-Authentication] Special Characters #4434

manuth opened this issue Jul 12, 2018 · 5 comments
Labels
issue/stale type/enhancement An improvement of existing functionality

Comments

@manuth
Copy link

manuth commented Jul 12, 2018

  • 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

@manuth manuth changed the title [LDAP-Authentication] Special [LDAP-Authentication] Special Characters Jul 12, 2018
@SBird1337
Copy link

I can confirm that users with, as far as I can tell, non-alphanumeric characters in their username cannot be migrated from LDAP to Gitea (In fact can't even get past the Gitea Authentication Module)

Since both Gitea and LDAP support more than alphanumeric characters I don't think it is intended that the Gitea LDAP Module does not.

@lunny lunny added the type/enhancement An improvement of existing functionality label Jul 20, 2018
@HoffmannP
Copy link
Contributor

HoffmannP commented Sep 19, 2018

Our University does not have any unique special-char-free speaking names in it's Active Directory. I hence have to use the non-speaking cryptic username alika X4NA4P. It's would be nice if gitea would just filter illegal characters at least as a workaround (eg. "Peter Hoffmann" -> "Peter_Hoffmann" oder "PeterHoffmann" or what ever).
Would a pull request adding this functionality be accepted?

@stale
Copy link

stale bot commented Jan 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Jan 8, 2019
@stale
Copy link

stale bot commented Feb 22, 2019

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed Feb 22, 2019
@manuth
Copy link
Author

manuth commented Feb 22, 2019

This issue still persists.
Please reopen this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants