Conversation
A value whose first byte is ':' or '<' is not a SAFE-INIT-CHAR per RFC 2849 and must be base64-encoded, but ldap_value_needs_base64() and the inline check in oldap_recv() only encoded on a control byte or leading/trailing blank. Such a value was emitted verbatim, producing LDIF that strict parsers reject.
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repro: an
ldap://reply carrying an attribute value whose first byte is:or<(both printable) is written to the client as\tattr: :value.Cause:
ldap_value_needs_base64()inldap.cand the inline check inoldap_recv()inopenldap.cbase64 a value that holds a control byte or leading/trailing blank, but not one that begins with:or<. RFC 2849 excludes both fromSAFE-INIT-CHAR, so the unencoded line is not valid LDIF andldapsearchbase64s these.Fix: treat a leading
:or<as needing base64 in both backends.