diff --git a/adminer/user.inc.php b/adminer/user.inc.php index df47e2dad..8cf5538ff 100644 --- a/adminer/user.inc.php +++ b/adminer/user.inc.php @@ -72,8 +72,8 @@ unset($grants[$object]); } if (preg_match('~^(.+)\\s*(\\(.*\\))?$~U', $object, $match) && ( - !grant("REVOKE", $revoke, $match[2], " ON $match[1] FROM $new_user") //! SQL injection - || !grant("GRANT", $grant, $match[2], " ON $match[1] TO $new_user") + !grant("REVOKE", $revoke, $match[2], " ON $match[1] FROM $new_user") //! SQL injection + || !grant("GRANT", $grant, $match[2], " ON $match[1] TO $new_user") )) { $error = true; break; diff --git a/compile.php b/compile.php index e99667f3d..cf990436e 100644 --- a/compile.php +++ b/compile.php @@ -103,7 +103,7 @@ function php_shrink($input) { $token = array(0, $token); } if ($tokens[$i+2][0] === T_CLOSE_TAG && $tokens[$i+3][0] === T_INLINE_HTML && $tokens[$i+4][0] === T_OPEN_TAG - && strlen(addcslashes($tokens[$i+3][1], "'\\")) < strlen($tokens[$i+3][1]) + 3 + && strlen(addcslashes($tokens[$i+3][1], "'\\")) < strlen($tokens[$i+3][1]) + 3 ) { $tokens[$i+2] = array(T_ECHO, 'echo'); $tokens[$i+3] = array(T_CONSTANT_ENCAPSED_STRING, "'" . addcslashes($tokens[$i+3][1], "'\\") . "'");