Skip to content

Commit 0df7e9f

Browse files
authored
Merge pull request #4989 from lcartey/lcartey/spring-inheritence-improvements
Java: Track taint through Spring Java bean getters on super types
2 parents e3bdebf + 76c9b64 commit 0df7e9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,9 @@ private predicate taintPreservingQualifierToMethod(Method m) {
345345
m.getDeclaringType() instanceof TypeUri and
346346
m.hasName("toURL")
347347
or
348-
m instanceof GetterMethod and m.getDeclaringType() instanceof SpringUntrustedDataType
348+
m instanceof GetterMethod and
349+
m.getDeclaringType().getASubtype*() instanceof SpringUntrustedDataType and
350+
not m.getDeclaringType() instanceof TypeObject
349351
or
350352
m.getDeclaringType() instanceof SpringHttpEntity and
351353
m.getName().regexpMatch("getBody|getHeaders")

0 commit comments

Comments
 (0)