Commit 52b8db40 authored by Alexander Butenko's avatar Alexander Butenko Committed by GitHub

Merge pull request #631 from leigh-ols/leigh-ols-patch-2

Fix issue where orderBy strips spaces from fieldname
parents 158eec4f 106ff470
......@@ -1093,7 +1093,7 @@ class MysqliDb
{
$allowedDirection = Array("ASC", "DESC");
$orderbyDirection = strtoupper(trim($orderbyDirection));
$orderByField = preg_replace("/[^-a-z0-9\.\(\),_`\*\'\"]+/i", '', $orderByField);
$orderByField = preg_replace("/[^ -a-z0-9\.\(\),_`\*\'\"]+/i", '', $orderByField);
// Add table prefix to orderByField if needed.
//FIXME: We are adding prefix only if table is enclosed into `` to distinguish aliases
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment