Improve sanity check on site name a bit: ban '#' (number sign). There are undoubtedl...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 16 Jan 2008 17:42:46 +0000 (17:42 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 16 Jan 2008 17:42:46 +0000 (17:42 +0000)
RELEASE-NOTES
config/index.php

index c4c0cd3..af03bfa 100644 (file)
@@ -314,6 +314,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 12567) Fix for misformatted read-only messages on edit, protect.
   Also added proper read-only checks to several special pages.
   Have removed read-only checks from the general user permission framework.
+* Creating a site with a name containing '#' is no longer permitted, since the
+  name will not work (but $wgSiteName is not checked if manually set).
 
 
 == Parser changes in 1.12 ==
index 3e591b4..c4cf210 100644 (file)
@@ -599,8 +599,8 @@ print "<li style='font-weight:bold;color:green;font-size:110%'>Environment check
 /* Check for validity */
 $errs = array();
 
-if( $conf->Sitename == "" || $conf->Sitename == "MediaWiki" || $conf->Sitename == "Mediawiki" ) {
-       $errs["Sitename"] = "Must not be blank or \"MediaWiki\"";
+if( preg_match( '/^$|^mediawiki$|#/i', $conf->Sitename ) ) {
+       $errs["Sitename"] = "Must not be blank or \"MediaWiki\" and may not contain \"#\"";
 }
 if( $conf->DBuser == "" ) {
        $errs["DBuser"] = "Must not be blank";