bug 781170 bad syntax for DROP DATABASE check

This commit is contained in:
Marc Delisle
2003-08-01 01:52:51 +00:00
parent 548361da2e
commit e3c809e61b
2 changed files with 3 additions and 2 deletions

View File

@@ -14,7 +14,8 @@ $Source$
2003-07-31 Marc Delisle <lem9@users.sourceforge.net>
* 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 <lem9@users.sourceforge.net>
* tbl_move_copy.php3: wrong Missing message

View File

@@ -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