Merge pull request #4989 from lcartey/lcartey/spring-inheritence-improvements

Java: Track taint through Spring Java bean getters on super types
This commit is contained in:
Anders Schack-Mulligen
2021-02-03 15:06:03 +01:00
committed by GitHub

View File

@@ -345,7 +345,9 @@ private predicate taintPreservingQualifierToMethod(Method m) {
m.getDeclaringType() instanceof TypeUri and
m.hasName("toURL")
or
m instanceof GetterMethod and m.getDeclaringType() instanceof SpringUntrustedDataType
m instanceof GetterMethod and
m.getDeclaringType().getASubtype*() instanceof SpringUntrustedDataType and
not m.getDeclaringType() instanceof TypeObject
or
m.getDeclaringType() instanceof SpringHttpEntity and
m.getName().regexpMatch("getBody|getHeaders")