From d3f0407804d7b3734ec0e59f7736e0fa7adc1296 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 16 Apr 2007 16:48:37 +0000 Subject: [PATCH] Fix #7285: need to check MySQL username length during installation --- RELEASE-NOTES | 1 + config/index.php | 3 +++ 2 files changed, 4 insertions(+) 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"; } -- 2.20.1