Turn register globals off. Hat tip: Christian Schmidt
git-svn-id: https://develop.svn.wordpress.org/trunk@2768 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
67ebbbe5a3
commit
9ae33f4f18
@ -3,6 +3,10 @@ $HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
|
|||||||
$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
|
$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
|
||||||
$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
|
$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
|
||||||
|
|
||||||
|
// Turn register globals off - Christian Schmidt
|
||||||
|
foreach ( array_merge($_REQUEST, $_SERVER, $_ENV) as $name => $value )
|
||||||
|
unset($$name);
|
||||||
|
|
||||||
// Fix for IIS, which doesn't set REQUEST_URI
|
// Fix for IIS, which doesn't set REQUEST_URI
|
||||||
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
|
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
|
||||||
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI?
|
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI?
|
||||||
@ -69,6 +73,8 @@ $tablelinkcategories = $wpdb->linkcategories;
|
|||||||
$tableoptions = $wpdb->options;
|
$tableoptions = $wpdb->options;
|
||||||
$tablepostmeta = $wpdb->postmeta;
|
$tablepostmeta = $wpdb->postmeta;
|
||||||
|
|
||||||
|
$wp_filters = array();
|
||||||
|
|
||||||
require (ABSPATH . WPINC . '/functions.php');
|
require (ABSPATH . WPINC . '/functions.php');
|
||||||
require (ABSPATH . WPINC . '/default-filters.php');
|
require (ABSPATH . WPINC . '/default-filters.php');
|
||||||
require_once (ABSPATH . WPINC . '/wp-l10n.php');
|
require_once (ABSPATH . WPINC . '/wp-l10n.php');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user