From 456206c7416904cf6bed6cebb2e7697cf2b26555 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 16 Apr 2012 21:52:02 +0000 Subject: [PATCH] Do sanity checks for register_globals and magic quotes in setup-config.php. see #13839. git-svn-id: http://svn.automattic.com/wordpress/trunk@20482 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/setup-config.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index b70ce3b9f..8b7a5403c 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -47,10 +47,18 @@ require(ABSPATH . WPINC . '/version.php'); // Also loads functions.php, plugin.php, l10n.php, pomo/mo.php (all required by setup-config.php) wp_load_translations_early(); +// Check for the required PHP version and for the MySQL extension or a database drop-in. wp_check_php_mysql_versions(); +// Turn register_globals off. +wp_unregister_GLOBALS(); + require_once(ABSPATH . WPINC . '/compat.php'); require_once(ABSPATH . WPINC . '/class-wp-error.php'); +require_once(ABSPATH . WPINC . '/formatting.php'); + +// Add magic quotes and set up $_REQUEST ( $_GET + $_POST ) +wp_magic_quotes(); if ( ! file_exists( ABSPATH . 'wp-config-sample.php' ) ) wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) );