workaround for any current or future exploit of the $GLOBALS overwrite vulnerability
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 31 Oct 2005 21:14:07 +0000 (21:14 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 31 Oct 2005 21:14:07 +0000 (21:14 +0000)
img_auth.php
index.php
profileinfo.php
redirect.php
thumb.php
trackback.php

index 6f6152e..341b7e2 100644 (file)
 # Valid web server entry point, enable includes
 define( 'MEDIAWIKI', true );
 
+if ( isset( $_REQUEST['GLOBALS'] ) ) {
+       die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
+}
+
 require_once( 'includes/Defines.php' );
 require_once( './LocalSettings.php' );
 require_once( 'includes/Setup.php' );
index d623ae2..478a0c6 100644 (file)
--- a/index.php
+++ b/index.php
@@ -9,6 +9,10 @@ $wgRequestTime = microtime();
 unset( $IP );
 @ini_set( 'allow_url_fopen', 0 ); # For security...
 
+if ( isset( $_REQUEST['GLOBALS'] ) ) {
+       die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
+}
+
 # Valid web server entry point, enable includes.
 # Please don't move this line to includes/Defines.php. This line essentially defines
 # a valid entry point. If you put it in includes/Defines.php, then any script that includes
index 1c603b6..2f54fea 100644 (file)
 $wgDBadminuser = $wgDBadminpassword = $wgDBserver = $wgDBname = $wgEnableProfileInfo = false;
 
 define("MEDIAWIKI", 1);
+if ( isset( $_REQUEST['GLOBALS'] ) ) {
+       print $GLOBALS;
+       die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
+}
 
 require_once("./includes/Defines.php");
 require_once("./LocalSettings.php");
index 92a8890..7c7aa3b 100644 (file)
@@ -3,6 +3,9 @@ unset( $DP );
 unset( $IP );
 $wgCommandLineMode = false;
 define( 'MEDIAWIKI', true );
+if ( isset( $_REQUEST['GLOBALS'] ) ) {
+       die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
+}
 
 require_once( './includes/Defines.php' );
 require_once( './LocalSettings.php' );
index 0183c3f..439b5b5 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -7,6 +7,10 @@
 
 define( 'MEDIAWIKI', true );
 unset( $IP );
+if ( isset( $_REQUEST['GLOBALS'] ) ) {
+       die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
+}
+
 $wgNoOutputBuffer = true;
 
 require_once( './includes/Defines.php' );
index a2c9d8d..64ca383 100644 (file)
@@ -7,6 +7,10 @@
 
 unset($IP);
 define('MEDIAWIKI', true);
+if ( isset( $_REQUEST['GLOBALS'] ) ) {
+       die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
+}
+
 require_once('./includes/Defines.php');
 
 if (!file_exists('LocalSettings.php'))