#53. Wrongly escaped LDAP character for RDNs that begins with uid=

This commit is contained in:
nuxsmin
2014-08-03 23:07:05 +02:00
parent f9ffc112ba
commit 668343f14e

View File

@@ -395,7 +395,7 @@ class SP_LDAP
*/
private static function escapeLdapDN($dn)
{
$chars = array('/(,)(?!cn|ou|dc)/', '/(?<!cn|ou|dc)(=)/', '/(")/', '/(;)/', '/(>)/', '/(<)/', '/(\+)/', '/(#)/', '/\G(\s)/', '/(\s)(?=\s*$)/', '/(\/)/');
$chars = array('/(,)(?!uid|cn|ou|dc)/', '/(?<!uid|cn|ou|dc)(=)/', '/(")/', '/(;)/', '/(>)/', '/(<)/', '/(\+)/', '/(#)/', '/\G(\s)/', '/(\s)(?=\s*$)/', '/(\/)/');
return preg_replace($chars, '\\\$1', $dn);
}
}