Skip to content

Commit fd649c1

Browse files
committed
Fix getHost() (ldap.host = ip is not covered)
1 parent f7a6628 commit fd649c1

File tree

1 file changed

+5
-6
lines changed
  • ruby/ql/lib/codeql/ruby/frameworks

1 file changed

+5
-6
lines changed

ruby/ql/lib/codeql/ruby/frameworks/Ldap.qll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ module NetLdap {
6464
NetLdapBind() { this = l.getAMethodCall("bind") }
6565

6666
override DataFlow::Node getHost() {
67-
(
68-
result = l.getKeywordArgument("encryption")
69-
or
70-
result = l.getAMethodCall("encryption").getArgument(0)
71-
) and
72-
result.getConstantValue().isStringlikeValue(":simple_tls")
67+
result =
68+
[
69+
l.getKeywordArgument("host"), l.getAMethodCall("host").getArgument(0),
70+
l.getAMethodCall("host").getKeywordArgument("method")
71+
]
7372
}
7473

7574
override DataFlow::Node getPassword() {

0 commit comments

Comments
 (0)