Skip to content

Commit 16f2957

Browse files
authored
Merge pull request github#3081 from aschackmull/java/urldecoder-step
Java: Add URLDecoder.decode as taint step.
2 parents bcda481 + 9c9e302 commit 16f2957

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
@@ -473,6 +473,10 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
473473
method.getName() = "toString" and arg = 0
474474
)
475475
or
476+
method.getDeclaringType().hasQualifiedName("java.net", "URLDecoder") and
477+
method.hasName("decode") and
478+
arg = 0
479+
or
476480
// A URI created from a tainted string is still tainted.
477481
method.getDeclaringType().hasQualifiedName("java.net", "URI") and
478482
method.hasName("create") and

0 commit comments

Comments
 (0)