diff options
author | Alfred Gebert <alfred.gebert@gmail.com> | 2010-11-05 15:53:41 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-11-05 15:53:41 +0100 |
commit | 6a07e704ca7f815c38bba0dc5277a8d729cfc75b (patch) | |
tree | 891e4855e5277da97911ef4dd33e6317c67030b4 /lib | |
parent | 95719fbea6acf52d03b17de742f16be8f1f0ce70 (diff) |
LDAP: detect non-binary attributes properly
If the query result has a binary attribute, the binary attribute is
base64 encoded. But all following non binary attributes are also base64
encoded which is wrong.
This is a test (LDAP server is public).
curl
ldap://x500.bund.de:389/o=Bund,c=DE?userCertificate,certificateSerialNumber?sub
?cn=*Woehleke*
Diffstat (limited to 'lib')
-rw-r--r-- | lib/openldap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/openldap.c b/lib/openldap.c index 4d5db4a51..ee4915f66 100644 --- a/lib/openldap.c +++ b/lib/openldap.c @@ -499,6 +499,8 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, if (bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7)) binary = 1; + else + binary = 0; for (i=0; bvals[i].bv_val != NULL; i++) { int binval = 0; |