pike.git / lib / modules / Protocols.pmod / LDAP.pmod / client.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1:   #pike __REAL_VERSION__      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.59 2004/09/14 10:40:07 mast Exp $ + // $Id: client.pike,v 1.60 2005/01/26 14:41:20 mast Exp $   //   // Honza Petrous, hop@unibase.cz   //   // ----------------------------------------------------------------------   //   // History:   //   // v0.0 1998-05-25 Starting up!   // v1.0 1998-06-21 Core functions (open, bind, unbind, delete, add,   // compare, search), only V2 operations,
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:363:    //! @expr{"ldap://hostname/basedn?attrlist?scope?ext"@}    //!    //! @param context    //! TLS context of connection    //!    //! @seealso    //! @[LDAP.client.bind], @[LDAP.client.search]    void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.59 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.60 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;       lauth = parse_url(url);       if(!stringp(lauth->scheme) ||    ((lauth->scheme != "ldap")   #if constant(SSL.Cipher.CipherAlgorithm)    && (lauth->scheme != "ldaps")
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:746:       static string unescape_filter_value (string val)    // Decodes escapes in val according to section 4 in RFC 2254 and    // section 3 in the older RFC 1960.    {    string res = "";    while (sscanf (val, "%s\\%s", string pre, val) == 2) {    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;    }       private static array(string) filter_get_sub1expr(string fstr) {    // returns one-level brackets enclosed expressions       array(string) rvarr = ({});    int leftflg = 0, nskip = 0;       for(int ix=0; ix<sizeof(fstr); ix++)