From c8d9381d39b1c0f5488cf059ea9aa659ee227da4 Mon Sep 17 00:00:00 2001 From: David McReynolds Date: Tue, 25 Aug 2020 08:56:17 -0700 Subject: [PATCH] fix: issue #562 --- fuel/modules/fuel/config/fuel_constants.php | 2 +- fuel/modules/fuel/models/Base_module_model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fuel/modules/fuel/config/fuel_constants.php b/fuel/modules/fuel/config/fuel_constants.php index 182645708..89f36e3a2 100644 --- a/fuel/modules/fuel/config/fuel_constants.php +++ b/fuel/modules/fuel/config/fuel_constants.php @@ -1,6 +1,6 @@ db->select($this->table_name.'.*'); // make select table specific } - if (!empty($col)) $this->db->order_by(str_replace(' ', '', $col), str_replace(' ', '', $order), FALSE); + if (!empty($col)) $this->db->order_by($this->db->escape($col), $this->db->escape($order), FALSE); if (!empty($limit)) $this->db->limit((int) $limit); $this->db->offset((int)$offset);