From 16908999edae23a31b3f748c31c6c3196b6ba1da Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Fri, 28 Apr 2023 10:04:26 +0000 Subject: Simplify escapeFilterPart Signed-off-by: Aaron Dewes --- apps/user_ldap/lib/Access.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'apps') diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 0b115c42764..8086b95271f 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1421,9 +1421,7 @@ class Access extends LDAPUtility { $asterisk = '*'; $input = mb_substr($input, 1, null, 'UTF-8'); } - $search = ['*', '\\', '(', ')']; - $replace = ['\\*', '\\\\', '\\(', '\\)']; - return $asterisk . str_replace($search, $replace, $input); + return $asterisk . ldap_escape($input, '', LDAP_ESCAPE_FILTER); } /** -- cgit v1.2.3