File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
python/ql/src/experimental/Security/CWE-113 Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ import semmle.python.dataflow.new.DataFlow
17
17
import semmle.python.dataflow.new.TaintTracking
18
18
import semmle.python.ApiGraphs
19
19
import DataFlow:: PathGraph
20
- import semmle.python.frameworks.Flask
21
20
22
- class WerkzeugHeader extends DataFlow:: Node {
23
- WerkzeugHeader ( ) {
24
- exists ( DataFlow:: CallCfgNode headerInstance , DataFlow:: AttrRead addMethod |
25
- headerInstance =
21
+ class WerkzeugHeaderCall extends DataFlow:: CallCfgNode {
22
+ WerkzeugHeaderCall ( ) {
23
+ exists ( DataFlow:: AttrRead addMethod |
24
+ this .getFunction ( ) = addMethod and
25
+ addMethod .getObject ( ) .getALocalSource ( ) =
26
26
API:: moduleImport ( "werkzeug" ) .getMember ( "datastructures" ) .getMember ( "Headers" ) .getACall ( ) and
27
- addMethod .getAttributeName ( ) = "add" and
28
- addMethod .getObject ( ) .getALocalSource ( ) = headerInstance and
29
- this = addMethod .( DataFlow:: CallCfgNode ) .getArg ( 1 )
27
+ addMethod .getAttributeName ( ) = "add"
30
28
)
31
29
}
30
+
31
+ DataFlow:: Node getHeaderInputNode ( ) { result = this .getArg ( 1 ) }
32
32
}
33
33
34
34
class FlaskHeader extends DataFlow:: Node {
You can’t perform that action at this time.
0 commit comments