Change getResource() to be a taint step

This commit is contained in:
luchua-bc
2022-04-19 15:55:09 +00:00
parent 7029802f3b
commit f0c4b1955b
4 changed files with 62 additions and 13 deletions

View File

@@ -14,11 +14,21 @@ class ExternalContext extends RefType {
}
/**
* The methods `getResource()` and `getResourceAsStream()` declared in JSF `ExternalContext`.
* The method `getResource()` declared in JSF `ExternalContext`.
*/
class GetFacesResourceMethod extends Method {
GetFacesResourceMethod() {
this.getDeclaringType().getASupertype*() instanceof ExternalContext and
this.hasName(["getResource", "getResourceAsStream"])
this.hasName("getResource")
}
}
/**
* The method `getResourceAsStream()` declared in JSF `ExternalContext`.
*/
class GetFacesResourceAsStreamMethod extends Method {
GetFacesResourceAsStreamMethod() {
this.getDeclaringType().getASupertype*() instanceof ExternalContext and
this.hasName("getResourceAsStream")
}
}