File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
java/ql/src/Security/CWE/CWE-90 Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,12 @@ is likely to be able to run malicious LDAP queries.</p>
1111<recommendation >
1212<p >If user input must be included in an LDAP query, it should be escaped to
1313avoid a malicious user providing special characters that change the meaning
14- of the query. If possible build the LDAP query (or search filter / DN) using your
15- framework helper methods to avoid string concatenation, or escape user input
16- using the right LDAP encoding method, for example encodeForLDAP from OWASP ESAPI,
17- LdapEncoder from Spring LDAP or Filter.encodeValue from UnboundID library.</p >
14+ of the query. If possible build the LDAP query using framework helper methods, for example
15+ from Spring's <code >LdapQueryBuilder</code > and <code >LdapNameBuilder</code >,
16+ instead of string concatenation. Alternatively, escape user input using an appropriate
17+ LDAP encoding method, for example: <code >encodeForLDAP</code > or </code >encodeForDN</code >
18+ from OWASP ESAPI, <code >LdapEncoder.filterEncode</code > or <code >LdapEncoder.nameEncode</code >
19+ from Spring LDAP, or <code >Filter.encodeValue</code > from UnboundID library.</p >
1820</recommendation >
1921
2022<example >
You can’t perform that action at this time.
0 commit comments