Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify escapeFilterPart
Signed-off-by: Aaron Dewes <[email protected]>
  • Loading branch information
AaronDewes committed Aug 13, 2023
commit 16908999edae23a31b3f748c31c6c3196b6ba1da
4 changes: 1 addition & 3 deletions apps/user_ldap/lib/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -1421,9 +1421,7 @@ public function escapeFilterPart($input, $allowAsterisk = false): string {
$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);
}

/**
Expand Down