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

[Question] Does one need to validate characters when using simple_bind? #129

Closed
Zerowalker opened this issue Jul 29, 2024 · 2 comments
Closed

Comments

@Zerowalker
Copy link

As title specifies, does one need to make sure the characters in the username (or/and password?) are valid?
If I understand it correctly not all characters can be used upon binding,
It depends on the LDAP server, but the specification lists some that are always wrong: https://www.ietf.org/rfc/rfc2253.txt

As when using filters one needs to use ldap_escape to ensure it both works properly and can't be exploited.
So was wondering if there is a similar approach when simple_bind is used?

Thanks!

PS: If possible perhaps Discussions can be opened to prevent questions appearing as "issues"?

@inejge
Copy link
Owner

inejge commented Jul 29, 2024

Ensuring that the bind DN is valid is entirely on the client. The protocol will transport whatever's supplied as an octet string, and the server should validate it and refuse the operation if it's malformed. There is the dn_escape() utility function which can be applied to RDN values when constructing the DN.

As for Discussions -- I don't mind seeing questions here, especially if they're explicitly tagged as such. There are not many, anyway. (I always close any usage/question issue when I judge that the conversation has run its course.)

@Zerowalker
Copy link
Author

Got it, thanks for the quick response! :)

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

No branches or pull requests

2 participants