From d4074c1976ac764f45b96af39c88ac0fb2f18a1c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 24 Jun 2008 14:11:54 +0000 Subject: [PATCH] protect view name with backquotes --- ChangeLog | 1 + view_create.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1a42320ea..01a98b37d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA thanks to Richard Heaton - wotnot - bug [XHTML] problem with tabindex and radio fields - bug #1971221 [interface] tabindex not set correctly +- bug [views] VIEW name created via the GUI was not protected with backquotes 2.11.7.0 (2008-06-23) - bug #1908719 [interface] New field cannot be auto-increment and primary key diff --git a/view_create.php b/view_create.php index 6401bc7a9..ce3f8ff72 100644 --- a/view_create.php +++ b/view_create.php @@ -29,7 +29,7 @@ if (isset($_POST['submitoptions'])) { if (isset($_POST['algorithm'])) { $create_query .= ' ALGORITHM = ' . $_POST['algorithm'] . $sep; } - $create_query .= ' VIEW ' . $_POST['view_name'] . $sep; + $create_query .= ' VIEW ' . PMA_backquote($_POST['view_name']) . $sep; if (!empty($_POST['column_names'])) { $create_query .= ' (' . $_POST['column_names'] . ')' . $sep;