mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-21 15:56:51 +01:00
#53. Wrongly escaped LDAP character for RDNs that begins with uid=
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user