Skip to content

Commit 9c9e302

Browse files
committed
Java: Add URLDecoder.decode as taint step.
1 parent 9fc75f1 commit 9c9e302

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,10 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
466466
method.getName() = "toString" and arg = 0
467467
)
468468
or
469+
method.getDeclaringType().hasQualifiedName("java.net", "URLDecoder") and
470+
method.hasName("decode") and
471+
arg = 0
472+
or
469473
// A URI created from a tainted string is still tainted.
470474
method.getDeclaringType().hasQualifiedName("java.net", "URI") and
471475
method.hasName("create") and

0 commit comments

Comments
 (0)