Merged in bugfix/PMCORE-3640 (pull request #8402)

PMCORE-3640

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2022-03-23 21:10:54 +00:00
committed by Julio Cesar Laura Avendaño

View File

@@ -241,14 +241,15 @@ function executeQuery($sqlStatement, $dbConnectionUID = 'workflow', $parameters
try {
try {
(new SqlBlacklist($sqlStatement))->validate();
$sqlStatementCheck = trim($sqlStatement);
$sqlStatementCheck = str_replace('(', '', $sqlStatementCheck);
(new SqlBlacklist($sqlStatementCheck))->validate();
} catch (Exception $e) {
G::SendTemporalMessage($e->getMessage(), 'error', 'labels');
throw new SQLException($e->getMessage());
}
$statement = trim($sqlStatement);
$statement = str_replace('(', '', $statement);
$statement = $sqlStatementCheck;
$result = false;
// Check to see if we're not running oracle, which is usually a safe default