summaryrefslogtreecommitdiff
path: root/redirect.php
blob: c0e8746ef6f507a533071d5c7b69516a2ccc0c54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
unset( $DP );
unset( $IP );
$wgCommandLineMode = false;
define( 'MEDIAWIKI', true );
if ( isset( $_REQUEST['GLOBALS'] ) ) {
	echo '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>';
	die( -1 );
}

require_once( './includes/Defines.php' );
require_once( './LocalSettings.php' );
global $wgArticlePath;

require_once( 'includes/WebRequest.php' );
$wgRequest = new WebRequest();

$page = $wgRequest->getVal( 'wpDropdown' );

$url = str_replace( "$1", urlencode( $page ), $wgArticlePath );

header( "Location: {$url}" );
?>