From: Robin Appelman Date: Tue, 2 Aug 2011 19:33:29 +0000 (+0200) Subject: limit the length of the mysql username during setup X-Git-Tag: v3.0~267^2~302 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e50abdd35597d0d3431a481260646224642b313b;p=nextcloud-server.git limit the length of the mysql username during setup --- diff --git a/lib/setup.php b/lib/setup.php index 41cfa1750ab..f295d69562e 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -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);