From fa8e82efab3b99f87a5f4f8eb7abc04c6c6566e1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 25 Aug 2014 17:40:16 +0000 Subject: [PATCH] Send nocache_headers() on installation screens and when redirecting to them. fixes #29248. Built from https://develop.svn.wordpress.org/trunk@29599 git-svn-id: http://core.svn.wordpress.org/trunk@29373 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/install.php | 2 ++ wp-admin/setup-config.php | 2 ++ wp-includes/load.php | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-admin/install.php b/wp-admin/install.php index a846abb088..8fa704aa60 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -41,6 +41,8 @@ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); /** Load wpdb */ require_once( ABSPATH . WPINC . '/wp-db.php' ); +nocache_headers(); + $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; /** diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index dfcd4edf9b..3ca3059d7c 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -34,6 +34,8 @@ require( ABSPATH . 'wp-settings.php' ); require( ABSPATH . 'wp-admin/includes/upgrade.php' ); +nocache_headers(); + // Support wp-config-sample.php one level up, for the develop repo. if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) $config_file = file( ABSPATH . 'wp-config-sample.php' ); diff --git a/wp-includes/load.php b/wp-includes/load.php index 043743e244..07f2283ab9 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -466,9 +466,14 @@ function wp_start_object_cache() { */ function wp_not_installed() { if ( is_multisite() ) { - if ( ! is_blog_installed() && ! defined( 'WP_INSTALLING' ) ) + if ( ! is_blog_installed() && ! defined( 'WP_INSTALLING' ) ) { + nocache_headers(); + wp_die( __( 'The site you have requested is not installed properly. Please contact the system administrator.' ) ); + } } elseif ( ! is_blog_installed() && false === strpos( $_SERVER['PHP_SELF'], 'install.php' ) && !defined( 'WP_INSTALLING' ) ) { + nocache_headers(); + require( ABSPATH . WPINC . '/kses.php' ); require( ABSPATH . WPINC . '/pluggable.php' ); require( ABSPATH . WPINC . '/formatting.php' );