mirror of
https://github.com/vrana/adminer.git
synced 2025-08-14 02:23:59 +02:00
Allow storing empty user password
This commit is contained in:
@@ -51,7 +51,7 @@ if ($_POST && !$error) {
|
|||||||
} else {
|
} else {
|
||||||
$new_user = q($_POST["user"]) . "@" . q($_POST["host"]); // if $_GET["host"] is not set then $new_user is always different
|
$new_user = q($_POST["user"]) . "@" . q($_POST["host"]); // if $_GET["host"] is not set then $new_user is always different
|
||||||
$pass = $_POST["pass"];
|
$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
|
// compute hash in a separate query so that plain text password is not saved to history
|
||||||
$pass = $connection->result("SELECT PASSWORD(" . q($pass) . ")");
|
$pass = $connection->result("SELECT PASSWORD(" . q($pass) . ")");
|
||||||
$error = !$pass;
|
$error = !$pass;
|
||||||
|
Reference in New Issue
Block a user