1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 20:15:03 -05:00

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*
This commit is contained in:
Alfred Gebert 2010-11-05 15:53:41 +01:00 committed by Daniel Stenberg
parent 95719fbea6
commit 6a07e704ca

View File

@ -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)) if (bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7))
binary = 1; binary = 1;
else
binary = 0;
for (i=0; bvals[i].bv_val != NULL; i++) { for (i=0; bvals[i].bv_val != NULL; i++) {
int binval = 0; int binval = 0;