[
https://issues.apache.org/jira/browse/DIRSHARED-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489369#comment-13489369
]
Hendy Irawan commented on DIRSHARED-143:
----------------------------------------
LdapEncoder.filterEncode("sm*sh") => sm\2ash
There is Apache 2.0 Licensed implementation here :
http://www.jarvana.com/jarvana/view/org/springframework/ldap/spring-ldap/1.3.0.RELEASE/spring-ldap-1.3.0.RELEASE-sources.jar!/org/springframework/ldap/core/LdapEncoder.java?format=ok
also with a few more useful encoding/decoding methods.
Is it okay to incorporate it from legal perspective?
I can make a patch that simply copies it verbatim, with a simple test. Just
name the artifact/package/className.
Thank you.
> Provide helper method to escape characters to be used in LDAP Filter literal
> ----------------------------------------------------------------------------
>
> Key: DIRSHARED-143
> URL: https://issues.apache.org/jira/browse/DIRSHARED-143
> Project: Directory Shared
> Issue Type: Improvement
> Affects Versions: 1.0.0-M13
> Reporter: Hendy Irawan
>
> In order to prevent malicious injection, user-provided input must be escaped
> (the 5 restricted characters) before being put in LDAP filter.
> Provide a helper static method to make it convenient and available as public
> API.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira