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

Issue in ldap3.utils.dn.parse_dn when strip=True #1138

Open
wassimwazzi opened this issue Apr 5, 2024 · 0 comments
Open

Issue in ldap3.utils.dn.parse_dn when strip=True #1138

wassimwazzi opened this issue Apr 5, 2024 · 0 comments

Comments

@wassimwazzi
Copy link

Given this example dn:
dn="cn=John Doe\ , o=github"

when calling ldap3.utils.dn.parse_dn(dn, strip=True) I get the error: Invalid final character.

This is because when strip=True, the space after the backslash is being removed, but the backslash is not getting removed, so the comma at the end of the RDN is getting escaped.
I believe the backslash should be removed as well.

According to ldap RFC:
Screenshot 2024-04-05 at 9 16 57 AM

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

1 participant