X-Git-Url: https://git.sur5r.net/?p=contagged;a=blobdiff_plain;f=inc%2Ffunctions.php;fp=inc%2Ffunctions.php;h=db8c6b0c5fd107b7c36da69ce1bc2e76a79918f2;hp=cb75190c9d3475ecb1825b1d11d1935a46022dc9;hb=276c00641cd20860521075e44e2e3789c8d9fa6b;hpb=f204d4d8fe772001803c3509f8be0528840be4eb diff --git a/inc/functions.php b/inc/functions.php index cb75190..db8c6b0 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -357,9 +357,13 @@ function ldap_store_objectclasses($dn,$classes){ * @author Andreas Gohr */ function ldap_filterescape($string){ - return preg_replace('/([\x00-\x1F\*\(\)\\\\])/e', - '"\\\\\".join("",unpack("H2","$1"))', - $string); + return preg_replace_callback( + '/([\x00-\x1F\*\(\)\\\\])/', + function ($matches) { + return "\\" . implode("", unpack("H2", $matches[1])); + }, + $string + ); } /**