From e3c809e61b44f55c7208b526f7cea7eb86caa5c2 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 1 Aug 2003 01:52:51 +0000 Subject: [PATCH] bug 781170 bad syntax for DROP DATABASE check --- ChangeLog | 3 ++- sql.php3 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72c00f93e..f18116ed4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -14,7 +14,8 @@ $Source$ 2003-07-31 Marc Delisle * tbl_replace_fields: bug 780793: a '+' sign in ENUM (or SET or a foreign key) was wrongly urldecoded to a space - + * sql.php3: bug 781170, bad check for DROP DATABASE and IF EXISTS + 2003-07-30 Marc Delisle * tbl_move_copy.php3: wrong Missing message diff --git a/sql.php3 b/sql.php3 index 3dd87dd02..ffc139263 100755 --- a/sql.php3 +++ b/sql.php3 @@ -55,7 +55,7 @@ PMA_checkParameters(array('sql_query', 'db')); */ if (!defined('PMA_CHK_DROP') && !$cfg['AllowUserDropDatabase'] - && eregi('DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE[[:space:]]', $sql_query)) { + && eregi('DROP[[:space:]]+DATABASE[[:space]]+', $sql_query)) { // Checks if the user is a Superuser // TODO: set a global variable with this information // loic1: optimized query