diff --git a/sql.inc.php b/sql.inc.php index 52f65c2f..f82e7341 100644 --- a/sql.inc.php +++ b/sql.inc.php @@ -33,7 +33,7 @@ if ($_POST && $error) { if (is_object($result)) { select($result); } else { - if (preg_match('~^\\s*(CREATE|DROP)\\s*DATABASE\\b~', $query)) { + if (preg_match("~^\\s*(CREATE|DROP)(\\s+|/\\*.*\\*/|-- [^\n]*\n)+DATABASE\\b~sU", $query)) { unset($_SESSION["databases"][$_GET["server"]]); } echo "
\n";