Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6774085

Browse files
committed
Python: Add note about parseid/XMLID
1 parent a315aa8 commit 6774085

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

python/ql/lib/semmle/python/frameworks/Lxml.qll

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ private module Lxml {
263263

264264
override predicate mayExecuteInput() { none() }
265265

266-
override DataFlow::Node getOutput() { result = this }
266+
override DataFlow::Node getOutput() {
267+
// Note: for `parseid` the result of the call is a tuple with `(root, dict)`, so
268+
// maybe we should not just say that the entire tuple is the decoding output... my
269+
// gut feeling is that THIS instance doesn't matter too much, but that it would be
270+
// nice to be able to do this in general. (this is a problem for both `lxml.etree`
271+
// and `xml.etree`)
272+
result = this
273+
}
267274
}
268275
}

python/ql/lib/semmle/python/frameworks/Stdlib.qll

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3297,7 +3297,14 @@ private module StdlibPrivate {
32973297

32983298
override predicate mayExecuteInput() { none() }
32993299

3300-
override DataFlow::Node getOutput() { result = this }
3300+
override DataFlow::Node getOutput() {
3301+
// Note: for `XMLID` the result of the call is a tuple with `(root, dict)`, so
3302+
// maybe we should not just say that the entire tuple is the decoding output... my
3303+
// gut feeling is that THIS instance doesn't matter too much, but that it would be
3304+
// nice to be able to do this in general. (this is a problem for both `lxml.etree`
3305+
// and `xml.etree`)
3306+
result = this
3307+
}
33013308
}
33023309
}
33033310

0 commit comments

Comments
 (0)