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:
committed by
Julio Cesar Laura Avendaño
commit
17f62d2696
@@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user