Merged in bugfix/PMCORE-1225-D (pull request #7922)

PMCORE-1225 The sentences DESCRIBE, EXPLAIN, SHOW, and BEGIN, now are supported.

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Roly Rudy Gutierrez Pinto
2021-05-07 19:41:36 +00:00
committed by Julio Cesar Laura Avendaño

View File

@@ -100,6 +100,10 @@ class SqlBlacklist extends Parser
$signed = get_class($statement);
foreach (Parser::$STATEMENT_PARSERS as $key => $value) {
if ($signed === $value && in_array(strtoupper($key), $config['statements'])) {
//SHOW statement is a special case, it does not require a table name
if (strtoupper($key) === 'SHOW') {
throw new Exception(G::loadTranslation('ID_INVALID_QUERY'));
}
$notExecuteQuery = true;
break;
}
@@ -116,6 +120,9 @@ class SqlBlacklist extends Parser
if ($key === 'table' && is_string($value)) {
$callback($value);
}
if ($key === 'token' && is_string($value)) {
$callback($value);
}
}
};