File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
python/ql/src/experimental/semmle/python/frameworks Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -163,12 +163,16 @@ private module Xml {
163
163
override DataFlow:: Node getAnInput ( ) { none ( ) }
164
164
165
165
override predicate vulnerable ( string kind ) {
166
- kind = "XXE" and not this .getArgByName ( "resolve_entities" ) .asExpr ( ) = any ( False f )
166
+ kind = "XXE" and
167
+ not (
168
+ exists ( this .getArgByName ( "resolve_entities" ) ) or
169
+ this .getArgByName ( "resolve_entities" ) .getALocalSource ( ) .asExpr ( ) = any ( False f )
170
+ )
167
171
or
168
172
kind = [ "Billion Laughs" , "Quadratic Blowup" ] and
169
173
(
170
- this .getArgByName ( "huge_tree" ) .asExpr ( ) = any ( True t ) and
171
- not this .getArgByName ( "resolve_entities" ) .asExpr ( ) = any ( False f )
174
+ this .getArgByName ( "huge_tree" ) .getALocalSource ( ) . asExpr ( ) = any ( True t ) and
175
+ not this .getArgByName ( "resolve_entities" ) .getALocalSource ( ) . asExpr ( ) = any ( False f )
172
176
)
173
177
}
174
178
}
@@ -231,7 +235,7 @@ private module Xml {
231
235
232
236
override predicate vulnerable ( string kind ) {
233
237
kind = [ "Billion Laughs" , "Quadratic Blowup" ] and
234
- this .getAMethodCall ( "disable_entities" ) .asExpr ( ) = any ( False f )
238
+ this .getArgByName ( "disable_entities" ) . getALocalSource ( ) .asExpr ( ) = any ( False f )
235
239
}
236
240
}
237
241
You can’t perform that action at this time.
0 commit comments