Skip to content

Commit 4165f2f

Browse files
Merge pull request #18910 from kamil-tekiela/Fix-creation-of-no-password-user
Fix creation of no-password user
2 parents e953a1d + de4dea1 commit 4165f2f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/Server/Privileges.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3104,7 +3104,7 @@ public function getSqlQueriesForDisplayAndAddUser(string $username, string $host
31043104
if ($_POST['pred_password'] === 'keep') {
31053105
$createUserReal = sprintf($createUserStmt, $slashedPassword);
31063106
} elseif ($_POST['pred_password'] === 'none') {
3107-
$createUserReal = sprintf($createUserStmt, '');
3107+
$createUserReal = sprintf($createUserStmt, "''");
31083108
} else {
31093109
if (
31103110
! ((Compatibility::isMariaDb() && $isMariaDBPwdPluginActive)
@@ -3125,7 +3125,7 @@ public function getSqlQueriesForDisplayAndAddUser(string $username, string $host
31253125
// and pre-5.2.0 MariaDB versions
31263126
$passwordSetReal = sprintf($passwordSetStmt, $slashedUsername, $slashedHostname, $slashedPassword);
31273127
} elseif ($_POST['pred_password'] === 'none') {
3128-
$passwordSetReal = sprintf($passwordSetStmt, $slashedUsername, $slashedHostname, '');
3128+
$passwordSetReal = sprintf($passwordSetStmt, $slashedUsername, $slashedHostname, "''");
31293129
} else {
31303130
$hashedPassword = $this->getHashedPassword($_POST['pma_pw']);
31313131
$passwordSetReal = sprintf($passwordSetStmt, $slashedUsername, $slashedHostname, $hashedPassword);

0 commit comments

Comments
 (0)