Skip to content

Commit

Permalink
CAMEL-18696: camel-ldap - Make filter a bit easier to use (#8687)
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Nov 8, 2022
1 parent c543ee1 commit c46cbcc
Showing 1 changed file with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,13 @@ private boolean prepareNextPage(LdapContext ldapContext) throws Exception {
}

/**
* Given an LDAP search string, returns the string with certain characters
* escaped according to RFC 2254 guidelines.
* Given an LDAP search string, returns the string with certain characters escaped according to RFC 2254 guidelines.
*
* The character mapping is as follows:
* char -> Replacement
* ---------------------------
* * -> \2a
* ( -> \28
* ) -> \29
* \ -> \5c
* \0 -> \00
* The character mapping is as follows: char -> Replacement --------------------------- * -> \2a ( -> \28 )
* -> \29 \ -> \5c \0 -> \00
*
* @param filter string to escape according to RFC 2254 guidelines
* @return String the escaped/encoded result
* @param filter string to escape according to RFC 2254 guidelines
* @return String the escaped/encoded result
*/
private String escapeFilter(String filter) {
if (filter == null) {
Expand Down

0 comments on commit c46cbcc

Please sign in to comment.