From: Antoine Musso Date: Mon, 16 Apr 2007 16:48:37 +0000 (+0000) Subject: Fix #7285: need to check MySQL username length during installation X-Git-Tag: 1.31.0-rc.0~53386 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=d3f0407804d7b3734ec0e59f7736e0fa7adc1296;p=lhc%2Fweb%2Fwiklou.git Fix #7285: need to check MySQL username length during installation --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fd15d0d500..73a8a36f57 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -318,6 +318,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN property. * (bug 9220) Removed obsoletes functions in install-utils.inc. * Removed obsoletes Title::getRelatedCache and Title:touchArray +* (bug 7285) Check MySQL username length during install == Maintenance == diff --git a/config/index.php b/config/index.php index 51dbcc5ed1..4b987cded4 100644 --- a/config/index.php +++ b/config/index.php @@ -544,6 +544,9 @@ if( $conf->Sitename == "" || $conf->Sitename == "MediaWiki" || $conf->Sitename = if( $conf->DBuser == "" ) { $errs["DBuser"] = "Must not be blank"; } +if( ($conf->DBtype == 'mysql') && (strlen($conf->DBuser) > 16) ) { + $errs["DBuser"] = "Username too long"; +} if( $conf->DBpassword == "" && $conf->DBtype != "postgres" ) { $errs["DBpassword"] = "Must not be blank"; }