diff --git a/wp-cache.php b/wp-cache.php index d645567d..88c15585 100644 --- a/wp-cache.php +++ b/wp-cache.php @@ -2096,9 +2096,14 @@ function wpsc_config_file_notices() { } add_action( 'admin_notices', 'wpsc_config_file_notices' ); function wpsc_dismiss_indexhtml_warning() { - check_ajax_referer( "wpsc-index-dismiss" ); - update_site_option( 'wp_super_cache_index_detected', 3 ); - die( 0 ); + check_ajax_referer( 'wpsc-index-dismiss' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( null, 403 ); + } + + update_site_option( 'wp_super_cache_index_detected', 3 ); + die( 0 ); } add_action( 'wp_ajax_wpsc-index-dismiss', 'wpsc_dismiss_indexhtml_warning' );