Protect Language.php against external execution. I don't think it's exploitable
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Aug 2004 21:19:24 +0000 (21:19 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Aug 2004 21:19:24 +0000 (21:19 +0000)
with register_globals, but it feels better to have it locked off.

languages/Language.php

index f52ac7d..2366c18 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+if( defined( "MEDIAWIKI" ) ) {
+
 #
 # In general you should not make customizations in these language files
 # directly, but should use the MediaWiki: special namespace to customize
@@ -1887,4 +1889,6 @@ class Language {
 
 # This should fail gracefully if there's not a localization available
 @include_once( 'Language' . ucfirst( $wgLanguageCode ) . '.php' );
+
+}
 ?>