From 517b47e0a0c2c9e7a4591677284f72ffee658aab Mon Sep 17 00:00:00 2001 From: Rahul Gurung Date: Thu, 22 Aug 2019 21:17:32 +0530 Subject: [PATCH 1/2] fixed error in change button for column names with backslash Signed-off-by: Rahul Gurung --- .../classes/Controllers/Table/TableStructureController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/classes/Controllers/Table/TableStructureController.php b/libraries/classes/Controllers/Table/TableStructureController.php index b82a565508..37503b228c 100644 --- a/libraries/classes/Controllers/Table/TableStructureController.php +++ b/libraries/classes/Controllers/Table/TableStructureController.php @@ -524,7 +524,7 @@ class TableStructureController extends TableController $fields_meta = array(); for ($i = 0; $i < $selected_cnt; $i++) { $value = $this->dbi->getColumns( - $this->db, $this->table, $selected[$i], true + $this->db, $this->table, addslashes($selected[$i]), true ); if (count($value) == 0) { $message = Message::error( From 9d2eeb93783b8afd453371981f494d439ed632b2 Mon Sep 17 00:00:00 2001 From: "R. Gurung" Date: Thu, 29 Aug 2019 09:35:12 +0530 Subject: [PATCH 2/2] Update libraries/classes/Controllers/Table/TableStructureController.php Co-Authored-By: William Desportes Signed-off-by: Rahul Gurung --- .../classes/Controllers/Table/TableStructureController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/classes/Controllers/Table/TableStructureController.php b/libraries/classes/Controllers/Table/TableStructureController.php index 37503b228c..06b26dcd4d 100644 --- a/libraries/classes/Controllers/Table/TableStructureController.php +++ b/libraries/classes/Controllers/Table/TableStructureController.php @@ -524,7 +524,7 @@ class TableStructureController extends TableController $fields_meta = array(); for ($i = 0; $i < $selected_cnt; $i++) { $value = $this->dbi->getColumns( - $this->db, $this->table, addslashes($selected[$i]), true + $this->db, $this->table, $this->dbi->escapeString($selected[$i]), true ); if (count($value) == 0) { $message = Message::error(