MDL-67316 ldap: Pass correct hex chars to hexdec()

Before php74 they were silently discarded, now they
show a deprecation message.
This commit is contained in:
Eloy Lafuente (stronk7)
2020-04-24 15:56:46 +02:00
parent f769b8f4d0
commit 92deb62243
+1 -1
View File
@@ -448,7 +448,7 @@ function ldap_stripslashes($text) {
$text = preg_replace_callback($quoted,
function ($match) use ($specialchars) {
if (ctype_xdigit(ltrim($match[1], '\\'))) {
return chr(hexdec($match[1]));
return chr(hexdec(ltrim($match[1], '\\')));
} else {
return str_replace($specialchars[LDAP_DN_SPECIAL_CHARS_QUOTED_ALPHA],
$specialchars[LDAP_DN_SPECIAL_CHARS],