Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll

Co-authored-by: Chris Smowton <smowton@github.com>
This commit is contained in:
haby0
2021-04-20 19:31:59 +08:00
committed by GitHub
parent 0053158884
commit b60bffaf83

View File

@@ -102,8 +102,7 @@ private class PrintSink extends UseOfLessTrustedSink {
exists(MethodAccess ma |
ma.getMethod().getName() in ["print", "println"] and
(
ma.getMethod().getDeclaringType().hasQualifiedName("java.io", "PrintWriter") or
ma.getMethod().getDeclaringType().hasQualifiedName("java.io", "PrintStream")
ma.getMethod().getDeclaringType().hasQualifiedName("java.io", ["PrintWriter", "PrintStream"])
) and
ma.getAnArgument() = this.asExpr()
)