mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Python: Fix string taint tests
The tests in ql/python/ql/test/library-tests/taint/strings/ shows that ClassValue::str() is not good enough.
This commit is contained in:
@@ -94,13 +94,11 @@ private predicate encode_decode(ControlFlowNode fromnode, CallNode tonode) {
|
||||
/* tonode = str(fromnode)*/
|
||||
private predicate to_str(ControlFlowNode fromnode, CallNode tonode) {
|
||||
tonode.getAnArg() = fromnode and
|
||||
tonode = ClassValue::str().getACall()
|
||||
// TODO: should it instead be this?
|
||||
// (
|
||||
// tonode = ClassValue::bytes().getACall()
|
||||
// or
|
||||
// tonode = ClassValue::unicode().getACall()
|
||||
// )
|
||||
(
|
||||
tonode = ClassValue::bytes().getACall()
|
||||
or
|
||||
tonode = ClassValue::unicode().getACall()
|
||||
)
|
||||
}
|
||||
|
||||
/* tonode = fromnode[:] */
|
||||
|
||||
Reference in New Issue
Block a user