mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Fix RVE-2025-1 potential SQL injection via third-party program
This commit is contained in:
parent
ae0e13eca9
commit
a208e0dbbc
1 changed files with 5 additions and 1 deletions
|
|
@ -619,7 +619,7 @@ class Query extends VariableBase
|
||||||
|
|
||||||
// Get the name of the column or expression to order by.
|
// Get the name of the column or expression to order by.
|
||||||
$column_name = '';
|
$column_name = '';
|
||||||
list($column_name, $is_expression) = $orderby->getValue($this->_args);
|
list($column_name, $is_expression, $is_default_value) = $orderby->getValue($this->_args);
|
||||||
if (!$column_name)
|
if (!$column_name)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -628,6 +628,10 @@ class Query extends VariableBase
|
||||||
{
|
{
|
||||||
$column_name = self::quoteName($column_name);
|
$column_name = self::quoteName($column_name);
|
||||||
}
|
}
|
||||||
|
elseif (!$is_default_value)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the ordering (ASC or DESC).
|
// Get the ordering (ASC or DESC).
|
||||||
if (preg_match('/^(ASC|DESC)$/i', $orderby->order_var ?: '', $matches))
|
if (preg_match('/^(ASC|DESC)$/i', $orderby->order_var ?: '', $matches))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue