FINERACT-1724: fix sql injection pattern check
This commit is contained in:
+1
-1
@@ -20,5 +20,5 @@ package org.apache.fineract.infrastructure.security.utils;
|
||||
|
||||
public interface SQLCommandCondition {
|
||||
|
||||
boolean checkCondition(String command, String sql);
|
||||
boolean checkCondition(String sql, String command);
|
||||
}
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ public final class SQLInjectionValidator {
|
||||
|
||||
private static void validateSQLCommand(String lowerCaseSQL, String[] commands, SQLCommandCondition condition) {
|
||||
for (String command : commands) {
|
||||
if (condition.checkCondition(command, lowerCaseSQL)) {
|
||||
if (condition.checkCondition(lowerCaseSQL, command)) {
|
||||
throw new SQLInjectionException();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user