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

Invalid credentials error with passwords containing special character #159

Open
Kenny-54 opened this issue Mar 4, 2022 · 4 comments
Open
Labels

Comments

@Kenny-54
Copy link

Kenny-54 commented Mar 4, 2022

Hi !

Describe the bug
Unable to bind on Linux platform if password contains characters from extended ASCII table (eg. £ € §).

Same code with same password works well on Windows.
Works well too with ldapsearch command line.

To Reproduce
Attempt to bind (simply for credential verification) with :

cn.Bind(LdapAuthType.Digest, new LdapCredential
{
    UserName = "username",
    Password = "password"
});

Failed with :

Invalid credentials. 8009030C: LdapErr: DSID-0C090590, comment: AcceptSecurityContext error, data 52e, v2580. Result: 49. Method: BindSasl

Tried with LdapAuthType.Simple too (LDAP or LDAPS) ==> same error

Expected behavior
Calling bind method not raising exception

Desktop (please complete the following information):

  • OS: Debian 11
  • Library version 2.7.13
  • .NET core 6.0
  • LDAP server : Active Directory

Thanks for your help !

@alexavator
Copy link

Hi

Does your code works well on Debian with simple password, without characters from extended ASCII table?

I guess I faced with the same problem, but the problem was not on password but on username. On windows you have to use username@domain, but on Linux you have to use just username. It works for me at Ubuntu 18.04

@Kenny-54
Copy link
Author

Hi

Yes, my code works well on Debian with simple password.
I tried with username@domain and just username, results are the same.
On Windows, it always works as expected.

Just for testing, I tried with a simple NodeJs script with ActiveDirectory package and it works well even with characters from extended ASCII table. But I have to make it in dotnet.

For now, we are going to use a windows server instead of Linux, only for that issue. I still hope to find a solution and made it work on Linux.

@flamencist flamencist changed the title Invalid crentials error with passwords containing special character Invalid credentials error with passwords containing special character Mar 26, 2022
@flamencist
Copy link
Owner

Hello! The ldap4net based on openldap solution. Please test with ldap-utils before using library

@Kenny-54
Copy link
Author

Hello !

With ldapsearch command, it works well, even with a password with a characters from extended ASCII table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants