Skip to content

Commit 6408ee2

Browse files
committed
Python: Fix bad join
1 parent fc2c623 commit 6408ee2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/ql/src/Security/CWE-327/InsecureProtocol.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class ProtocolConfiguration extends DataFlow::Node {
2525
or
2626
unsafe_context_creation(this, _)
2727
}
28+
29+
AstNode getNode() { result = this.asCfgNode().(CallNode).getFunction().getNode() }
2830
}
2931

3032
// Helper for pretty printer `callName`.
@@ -36,9 +38,7 @@ class ProtocolConfiguration extends DataFlow::Node {
3638
// we have to extend @py_ast_node.
3739
class Nameable extends @py_ast_node {
3840
Nameable() {
39-
exists(ProtocolConfiguration protocolConfiguration |
40-
this = protocolConfiguration.asCfgNode().(CallNode).getFunction().getNode()
41-
)
41+
this = any(ProtocolConfiguration pc).getNode()
4242
or
4343
exists(Nameable attr | this = attr.(Attribute).getObject())
4444
}

0 commit comments

Comments
 (0)