Branch: Tag:

2005-01-26

2005-01-26 14:41:16 by Martin Stjernholm <mast@lysator.liu.se>

Fixed the filter value unescaping function to comply better with the
somewhat peculiar escape method in RFC 1960.

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

2:      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.36 2005/01/24 10:42:54 wellhard Exp $ + // $Id: client.pike,v 1.37 2005/01/26 14:41:16 mast Exp $   //   // Honza Petrous, hop@unibase.cz   //
368:    void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.36 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.37 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;
715:    res += pre;    if (sscanf (val, "%2x%s", int chr, val) == 2)    res += sprintf ("%c", chr); -  else { +  else if (val != "" && (<'*', '(', ')'>)[val[0]]) {    res += val[..0];    val = val[1..];    } -  +  else { +  res += "\\" + val[..0]; +  val = val[1..];    } -  +  }    return res + val;    }