Skip to content

Can't login as [email protected] with ldap authentication enabled #5444

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

Closed
2 of 7 tasks
ghost opened this issue Dec 1, 2018 · 4 comments
Closed
2 of 7 tasks

Can't login as [email protected] with ldap authentication enabled #5444

ghost opened this issue Dec 1, 2018 · 4 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@ghost
Copy link

ghost commented Dec 1, 2018

  • Gitea version (or commit ref): v1.6.0
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04.1
  • 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:
xxxx/xx/xx xx:xx:xx [W] Failed to login '[email protected]' via 'local_ldap': Invalid pattern for attribute 'username' [[email protected]]: must be valid alpha or numeric or dash(-_) or dot characters
xxxx/xx/xx xx:xx:xx [I] Failed authentication attempt for [email protected] from xxx.xxx.xxx.xxx

Description

Additional information:

  • OpenLDAP: 2.4.45
  • Authentication type: LDAP (simple auth)
  • User DN: uid=%s,ou=my_ou,dc=example,dc=com
  • User Filter: (&(objectClass=inetOrgPerson)(uid=%s))

Obviously the "@" character is not in a class of allowed characters for "username". Will it be possible to add the "@" in the next version?

@ghost ghost changed the title Can't login with [email protected] with ldap authentication enabled Can't login as [email protected] with ldap authentication enabled Dec 1, 2018
@ghost
Copy link
Author

ghost commented Dec 1, 2018

Sorry, I put the issue in the comment field instead of the description field.

@lafriks
Copy link
Member

lafriks commented Dec 2, 2018

There was already request to add this but @ can not be added as allowed character as could lead to side effects in other places later on. It would be ok tho to have it replaced or domain part removed for username with additional option

@ghost
Copy link
Author

ghost commented Dec 3, 2018

I have seen that you can also authenticate via SMTP. For now this is a workaround. Thanks for the quick answer.

@techknowlogick techknowlogick added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Dec 4, 2018
@techknowlogick
Copy link
Member

Closing this issue as a workaround is present. If you have any follow up questions please feel free to open a thread on the forum

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

2 participants