Branch: Tag:

2005-12-16

2005-12-16 16:32:18 by Jonas Wallden <jonasw@roxen.com>

Fix bug with missing UTF-8 decoding of DN attribute.

Rev: lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1.56

2:      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.55 2005/04/20 15:37:48 mast Exp $ + // $Id: client.pike,v 1.56 2005/12/16 16:32:18 jonasw Exp $   //   // Honza Petrous, hop@unibase.cz   //
155:       foreach(ar, string raw1) {    oder = (.ldap_privates.ldap_der_decode(raw1)->elements[1]); -  attrs = (["dn":({ASN1_DECODE_DN(oder)})]); +  string dn = ASN1_DECODE_DN(oder); +  if (ldap_version == 3) +  dn = utf2s(dn); +  attrs = (["dn" : ({ dn }) ]);    if(catch(entry1 = ASN1_GET_ATTR_ARRAY(oder))) continue;    foreach(entry1, object attr1) {    attrs += ([ASN1_GET_ATTR_NAME(attr1):_get_attr_values(ldap_version, attr1)]);
368:    void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.55 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.56 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;