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

Semi colon is not treated as RDN separator #351

Closed
shaiacs opened this issue Dec 26, 2021 · 1 comment · Fixed by #352
Closed

Semi colon is not treated as RDN separator #351

shaiacs opened this issue Dec 26, 2021 · 1 comment · Fixed by #352

Comments

@shaiacs
Copy link

shaiacs commented Dec 26, 2021

A DN may contain RDNs that are separated by semi colons. Looks like the current code doesn't handle this correctly.
I believe this can be fixed by changing the following lines in Dn.parseDn method:
Line 104 from:
case char == ',' || char == '+':
to:
case char == ',' || char == '+' || char == ';':

Line 112 from:
if char == ',' {
to:
if char == ',' || char == ';' {

@cpuschma
Copy link
Member

cpuschma commented Dec 26, 2021

From rfc2253:

  1. Relationship with RFC 1779 and LDAPv2
    [...]
    Implementations MUST allow a semicolon character to be used instead
    of a comma to separate RDNs in a distinguished name, and MUST also
    allow whitespace characters to be present on either side of the comma
    or semicolon. The whitespace characters are ignored, and the
    semicolon replaced with a comma.

I'll look into this week and propose a PR

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

Successfully merging a pull request may close this issue.

2 participants