Merge pull request #2592 from nextcloud/backport-1268

Lower the role name before using it
This commit is contained in:
Morris Jobke 2016-12-12 18:48:07 -06:00 committed by GitHub
commit 9ff733c9a9
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class PostgreSQL extends AbstractDatabase {
//use the admin login data for the new database user //use the admin login data for the new database user
//add prefix to the postgresql user name to prevent collisions //add prefix to the postgresql user name to prevent collisions
$this->dbUser='oc_'.$username; $this->dbUser='oc_'.strtolower($username);
//create a new password so we don't need to store the admin config in the config file //create a new password so we don't need to store the admin config in the config file
$this->dbPassword = \OC::$server->getSecureRandom()->generate(30, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS); $this->dbPassword = \OC::$server->getSecureRandom()->generate(30, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS);