Fix #7285: need to check MySQL username length during installation
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 16 Apr 2007 16:48:37 +0000 (16:48 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 16 Apr 2007 16:48:37 +0000 (16:48 +0000)
RELEASE-NOTES
config/index.php

index fd15d0d..73a8a36 100644 (file)
@@ -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 ==
 
index 51dbcc5..4b987cd 100644 (file)
@@ -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";
 }