aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/setup
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/setup')
-rw-r--r--lib/private/setup/oci.php2
-rw-r--r--lib/private/setup/postgresql.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/setup/oci.php b/lib/private/setup/oci.php
index e5634572d90..d335df850cf 100644
--- a/lib/private/setup/oci.php
+++ b/lib/private/setup/oci.php
@@ -106,7 +106,7 @@ class OCI extends AbstractDatabase {
//add prefix to the oracle user name to prevent collisions
$this->dbUser='oc_'.$username;
//create a new password so we don't need to store the admin config in the config file
- $this->dbPassword=\OC_Util::generateRandomBytes(30);
+ $this->dbPassword = \OC::$server->getSecureRandom()->generate(30, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS);
//oracle passwords are treated as identifiers:
// must start with alphanumeric char
diff --git a/lib/private/setup/postgresql.php b/lib/private/setup/postgresql.php
index 59762209d08..850551e794f 100644
--- a/lib/private/setup/postgresql.php
+++ b/lib/private/setup/postgresql.php
@@ -61,7 +61,7 @@ class PostgreSQL extends AbstractDatabase {
//add prefix to the postgresql user name to prevent collisions
$this->dbUser='oc_'.$username;
//create a new password so we don't need to store the admin config in the config file
- $this->dbPassword=\OC_Util::generateRandomBytes(30);
+ $this->dbPassword = \OC::$server->getSecureRandom()->generate(30, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS);
$this->createDBUser($connection);
}