Skip to content

Commit

Permalink
Bugfix: randomly generated MySQL username exceeded MySQL's 32-charact…
Browse files Browse the repository at this point in the history
…er limit.
  • Loading branch information
Johannes-Werbrouck committed Aug 22, 2023
1 parent 98ec5f9 commit 0cc0029
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Commands/LaunchMySQLCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private function setSecretsMySQL(array $mysqlUserInput, FlyIoService $flyIoServi
{
//create random passwords and username
$password = base64_encode(random_bytes(32));
$username = base64_encode(random_bytes(32));
$username = base64_encode(random_bytes(16)); // mysql username has a character limit of 32. Base64 encoding makes the string longer, so only use a random 16-character string here.
$rootPassword = base64_encode(random_bytes(32));
}
catch (Exception $e)
Expand Down
Binary file modified builds/fly-laravel
Binary file not shown.

0 comments on commit 0cc0029

Please sign in to comment.