-
Notifications
You must be signed in to change notification settings - Fork 178
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
Fix for escape_userdn #226
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
@consideRatio Kindly review this PR |
We have this issue as well. Would it be possible to review this PR and if applicable merge it? |
I'm not sure whether the behaviour implemented in this PR is to be expected or not. Based on the function name |
Hi @manics Thank you for the response. To explain a bit more, I think we have a similar issue in our organization as the OP. |
Hey! I've never used this authenticator or worked properly with LDAP, so reviewing this is really complicated for me. A key question in my mind: is this a breaking change? It is if any usernames that previously worked are changed, but it isn't if only usernames that previously failed now no longer fails. Is this a breaking change? Its perfectly acceptable if it is, but if it is we need to communicate about it in a changelog and release a major version if it is. I'm just arriving to this project to do some chore maintenance to consider if its viable to use against jupyterhub 5 etc, and I'm not confident about the test suite coverage of this project. But anyhow, if this could go hand in hand with a test, that would be helpful. |
I've preliminary marked this as breaking just in case. |
@consideRatio Yes, this is not a breaking change. I've been using this branch on production for over a year and have faced no issues. Before this fix, many users couldn't log in if there was a parenthesis in the full name (in case of duplicate names AAD automatically adds a hash in parenthesis). |
I think maybe a bug remains still, considered in #243 (comment). |
Closing this in favor of #267 |
Solution to #225
When escape_userdn = True the ldapauthenticator escapes special chars in userdn but does not escapes special chars in username. This does not cause an issue when allowed_groups is null but it does cause an issue when allowed_groups is not null. I suggest that the username is also escaped when escape_userdn = True or add another parameter dedicated to escape username