Skip to content
Snippets Groups Projects
Unverified Commit 76c7356a authored by Joas Schilling's avatar Joas Schilling
Browse files

Only use alphanumeric chars for mysql password


/ and + can cause problems with other tools that you might want to run on your Nextcloud database.

Signed-off-by: default avatarJoas Schilling <coding@schilljs.com>
parent 6d291c3c
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ use OC\DB\MySqlTools;
use OCP\IDBConnection;
use OCP\ILogger;
use Doctrine\DBAL\Platforms\MySQL80Platform;
use OCP\Security\ISecureRandom;
class MySQL extends AbstractDatabase {
public $dbprettyname = 'MySQL/MariaDB';
......@@ -165,7 +166,7 @@ class MySQL extends AbstractDatabase {
$this->dbUser = $adminUser;
//create a random password so we don't need to store the admin password in the config file
$this->dbPassword = $this->random->generate(30);
$this->dbPassword = $this->random->generate(30, ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER);
$this->createDBUser($connection);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment