go-ldap / ldap

Basic LDAP v3 functionality for the GO programming language.
Other
2.25k stars 355 forks source link

fix: parsedn not handling attributes with equal char in value #425

Closed james-d-elliott closed 1 year ago

james-d-elliott commented 1 year ago

This fixes an issue where attributes with equal chars in the value would not be correctly parsed. As we only set the AttributeTypeAndValue's Type field once and we reset it on the step to the next AttributeTypeAndValue we can assume if this field already has a value that it should not consider it the type/value separator.

Fixes #416

james-d-elliott commented 1 year ago

Please note the test was designed using TDD. i.e. it fails before the fix, and passes after the fix.

cpuschma commented 1 year ago

Thank you for your PR! 👍