Merge pull request #3214 from aibaars/base64

Java: Add org.apache.commons.codec.(De|En)coder to TaintTrackingUtil
This commit is contained in:
Anders Schack-Mulligen
2020-05-06 09:21:18 +02:00
committed by GitHub
14 changed files with 667 additions and 1 deletions

View File

@@ -434,7 +434,15 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
or
(
method.getDeclaringType().hasQualifiedName("java.util", "Base64$Encoder") or
method.getDeclaringType().hasQualifiedName("java.util", "Base64$Decoder")
method.getDeclaringType().hasQualifiedName("java.util", "Base64$Decoder") or
method
.getDeclaringType()
.getASupertype*()
.hasQualifiedName("org.apache.commons.codec", "Encoder") or
method
.getDeclaringType()
.getASupertype*()
.hasQualifiedName("org.apache.commons.codec", "Decoder")
) and
(
method.getName() = "encode" and arg = 0 and method.getNumberOfParameters() = 1