Skip to content

Commit a48df42

Browse files
authored
Harden preload settings handler (#1033)
* Harden preload settings handler * Remove unused globals
1 parent 5c9fb59 commit a48df42

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

wp-cache.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4018,11 +4018,15 @@ function wpsc_get_minimum_preload_interval() {
40184018
}
40194019

40204020
function wpsc_preload_settings() {
4021-
global $wp_cache_preload_interval, $wp_cache_preload_on, $wp_cache_preload_taxonomies, $wp_cache_preload_email_me, $wp_cache_preload_email_volume, $wp_cache_preload_posts, $wpdb;
4021+
global $wp_cache_preload_interval, $wp_cache_preload_on, $wp_cache_preload_taxonomies, $wp_cache_preload_email_volume, $wp_cache_preload_posts, $valid_nonce;
40224022

40234023
if ( isset( $_POST[ 'action' ] ) == false || $_POST[ 'action' ] != 'preload' )
40244024
return;
40254025

4026+
if ( ! $valid_nonce ) {
4027+
return;
4028+
}
4029+
40264030
if ( isset( $_POST[ 'preload_off' ] ) ) {
40274031
wpsc_cancel_preload();
40284032
return;

0 commit comments

Comments
 (0)