Skip to content

Commit b802d79

Browse files
committed
Fix OPT_X_TLS_ mandatory options
1 parent ee98c0c commit b802d79

File tree

1 file changed

+1
-3
lines changed
  • python/ql/src/experimental/semmle/python/frameworks

1 file changed

+1
-3
lines changed

python/ql/src/experimental/semmle/python/frameworks/LDAP.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,11 @@ private module LDAP {
122122
)
123123
or
124124
// ldap_connection.set_option(ldap.OPT_X_TLS_%s, True)
125-
// ldap_connection.set_option(ldap.OPT_X_TLS_%s)
126125
exists(DataFlow::CallCfgNode setOption |
127126
setOption.getFunction().(DataFlow::AttrRead).getObject().getALocalSource() =
128127
initialize and
129128
setOption.getFunction().(DataFlow::AttrRead).getAttributeName() = "set_option" and
130-
setOption.getArg(0) =
131-
ldap().getMember("OPT_X_TLS_" + ["ALLOW", "TRY", "DEMAND", "HARD"]).getAUse() and
129+
setOption.getArg(0) = ldap().getMember("OPT_X_TLS_" + ["DEMAND", "HARD"]).getAUse() and
132130
not DataFlow::exprNode(any(False falseExpr))
133131
.(DataFlow::LocalSourceNode)
134132
.flowsTo(setOption.getArg(1))

0 commit comments

Comments
 (0)