From db7d05b3ecd9cf00ea17d7ba6cca8604ee9bfa98 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 25 Apr 2013 09:46:37 -0700 Subject: [PATCH] Allow storing empty user password --- adminer/user.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/user.inc.php b/adminer/user.inc.php index 39520bcb..fff17dcc 100644 --- a/adminer/user.inc.php +++ b/adminer/user.inc.php @@ -51,7 +51,7 @@ if ($_POST && !$error) { } else { $new_user = q($_POST["user"]) . "@" . q($_POST["host"]); // if $_GET["host"] is not set then $new_user is always different $pass = $_POST["pass"]; - if (!$_POST["hashed"]) { + if ($pass != '' && !$_POST["hashed"]) { // compute hash in a separate query so that plain text password is not saved to history $pass = $connection->result("SELECT PASSWORD(" . q($pass) . ")"); $error = !$pass;