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)
2019-11-20 17:45:32 +01:00
parent 3b69ed2104
commit 486bf50413

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],