Java: Add this. and fix mistake

This commit is contained in:
Joe Farebrother
2020-10-09 11:30:30 +01:00
parent 5d487b97da
commit ca9038350c
2 changed files with 7 additions and 6 deletions

View File

@@ -53,11 +53,12 @@ abstract class TaintPreservingMethod extends Method {
private class StringTaintPreservingMethod extends TaintPreservingMethod {
StringTaintPreservingMethod() {
getDeclaringType() instanceof TypeString and
hasName(["concat", "copyValueOf", "endsWith", "format", "formatted", "getBytes", "indent",
"intern", "join", "repeat", "split", "strip", "stripIndent", "stripLeading",
"stripTrailing", "substring", "toCharArray", "toLowerCase", "toString", "toUpperCase",
"trim"])
this.getDeclaringType() instanceof TypeString and
this
.hasName(["concat", "copyValueOf", "endsWith", "format", "formatted", "getBytes", "indent",
"intern", "join", "repeat", "split", "strip", "stripIndent", "stripLeading",
"stripTrailing", "substring", "toCharArray", "toLowerCase", "toString", "toUpperCase",
"trim"])
}
override predicate returnsTaint(int arg) {

View File

@@ -232,7 +232,7 @@ private class QueryBuilderBuildMethod extends TaintPreservingMethod {
int argument;
QueryBuilderBuildMethod() {
this.getDeclaringType().getASourceSupertype*() instanceof Class and
this.getDeclaringType().getASourceSupertype*() instanceof TypeSQLiteQueryBuilder and
// buildQuery(String[] projectionIn, String selection, String groupBy, String having, String sortOrder, String limit)
// buildQuery(String[] projectionIn, String selection, String[] selectionArgs, String groupBy, String having, String sortOrder, String limit)
// buildUnionQuery(String[] subQueries, String sortOrder, String limit)