Skip to content

Commit 0dec487

Browse files
Replace cast to DataFlow::CallNode
Co-authored-by: Alex Ford <[email protected]>
1 parent 6f1b406 commit 0dec487

File tree

1 file changed

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

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ module NetLdap {
5353
}
5454

5555
DataFlow::Node getAuthValue(string arg) {
56-
result = this.getKeywordArgument("auth").(DataFlow::CallNode).getKeywordArgument(arg)
56+
result =
57+
this.getKeywordArgument("auth")
58+
.(DataFlow::HashLiteralNode)
59+
.getElementFromKey(any(Ast::ConstantValue cv | cv.isStringlikeValue(arg)))
60+
}
5761
}
5862

5963
}

0 commit comments

Comments
 (0)