Fix register_globals vulnerability checked in last week.
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 9 Sep 2004 06:12:04 +0000 (06:12 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 9 Sep 2004 06:12:04 +0000 (06:12 +0000)
includes/DefaultSettings.php
includes/Namespace.php

index 133ab55..55d758e 100644 (file)
@@ -678,12 +678,13 @@ $wgUseRCPatrol = true;
 # If you rename it, then you can access them through the new namespace name.
 #
 # Custom namespaces should start at 100.
-#$wgExtraNamespaces
-#      array(100 => "Hilfe", 
+#$wgExtraNamespaces =
+#      array(100 => "Hilfe",
 #            101 => "Hilfe_Diskussion",
-#            102 =>"Aide", 
-#            103 =>"Discussion_Aide"
+#            102 => "Aide",
+#            103 => "Discussion_Aide"
 #            );
+$wgExtraNamespaces = NULL;
 
 # Enable SOAP interface. Off by default
 # SOAP is a protocoll for remote procedure calls (RPC) using http as middleware.
index 43f0d78..a52e06d 100644 (file)
@@ -34,8 +34,8 @@ $wgCanonicalNamespaceNames = array(
        NS_CATEGORY_TALK    => 'Category_talk'
 );
 
-if(isset($wgExtraNamespaces)) {
-       $wgCanonicalNamespaceNames=$wgCanonicalNamespaceNames+$wgExtraNamespaces;
+if( defined( 'MEDIAWIKI' ) && is_array( $wgExtraNamespaces ) ) {
+       $wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces;
 }
 
 /**