]> source.dussan.org Git - nextcloud-server.git/commitdiff
limit the length of the mysql username during setup
authorRobin Appelman <icewind1991@gmail.com>
Tue, 2 Aug 2011 19:33:29 +0000 (21:33 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Tue, 2 Aug 2011 19:33:35 +0000 (21:33 +0200)
lib/setup.php

index 41cfa1750abb5b5ab5492a5887f1b607467bd386..f295d69562ed0d3f1eb0bcadde5d4e340d3c4be7 100644 (file)
@@ -99,7 +99,7 @@ class OC_Setup {
                                                //use the admin login data for the new database user
 
                                                //add prefix to the mysql user name to prevent collissions
-                                               $dbusername='oc_mysql_'.$username;
+                                               $dbusername=substr('oc_mysql_'.$username,0,16);
                                                //hash the password so we don't need to store the admin config in the config file
                                                $dbpassword=md5(time().$password);