Skip to content

Commit 6a93099

Browse files
committed
Simplify the query and update qldoc
1 parent 32c5462 commit 6a93099

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</li>
2727
<li>
2828
Oracle:
29-
<a href="https://docs.oracle.com/javase/tutorial/jndi/ldap/simple.html">Simple authentication consists of sending the LDAP server the fully qualified DN of the client (user) and the client's clear-text password</a>
29+
<a href="https://docs.oracle.com/javase/tutorial/jndi/ldap/simple.html">Simple authentication</a>
3030
</li>
3131
</references>
3232
</qhelp>

java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,11 @@ where
202202
sink.getNode().asExpr() = va and
203203
exists(BasicAuthFlowConfig bc, DataFlow::PathNode source2, DataFlow::PathNode sink2 |
204204
bc.hasFlowPath(source2, sink2) and
205-
source2.getNode().asExpr().(CompileTimeConstantExpr).getStringValue() = "simple" and
206205
sink2.getNode().asExpr() = va
207206
) and
208207
not exists(SSLFlowConfig sc, DataFlow::PathNode source3, DataFlow::PathNode sink3 |
209208
sc.hasFlowPath(source3, sink3) and
210-
source3.getNode().asExpr().(CompileTimeConstantExpr).getStringValue() = "ssl" and
211-
sink3.getNode().asExpr() = va.getVariable().getAnAccess()
209+
sink3.getNode().asExpr() = va
212210
)
213211
select sink.getNode(), source, sink, "Insecure LDAP authentication from $@.", source.getNode(),
214212
"LDAP connection string"

0 commit comments

Comments
 (0)