File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111use OC \DatabaseSetupException ;
1212use OC \DB \Connection ;
1313use OC \DB \QueryBuilder \Literal ;
14- use OCP \Security \ISecureRandom ;
15- use OCP \Server ;
1614
1715class PostgreSQL extends AbstractDatabase {
1816 public $ dbprettyname = 'PostgreSQL ' ;
@@ -48,8 +46,9 @@ public function setupDatabase(): void {
4846
4947 //add prefix to the postgresql user name to prevent collisions
5048 $ this ->dbUser = 'oc_admin ' ;
51- //create a new password so we don't need to store the admin config in the config file
52- $ this ->dbPassword = Server::get (ISecureRandom::class)->generate (30 , ISecureRandom::CHAR_ALPHANUMERIC );
49+
50+ // Create a new password so we don't need to store the admin config in the config file
51+ $ this ->dbPassword = $ this ->generateDbPassword ();
5352
5453 $ this ->createDBUser ($ connection );
5554 }
You can’t perform that action at this time.
0 commit comments