We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a48df42 commit 29a906bCopy full SHA for 29a906b
1 file changed
wp-cache.php
@@ -2096,9 +2096,14 @@ function wpsc_config_file_notices() {
2096
}
2097
add_action( 'admin_notices', 'wpsc_config_file_notices' );
2098
function wpsc_dismiss_indexhtml_warning() {
2099
- check_ajax_referer( "wpsc-index-dismiss" );
2100
- update_site_option( 'wp_super_cache_index_detected', 3 );
2101
- die( 0 );
+ check_ajax_referer( 'wpsc-index-dismiss' );
+
+ if ( ! current_user_can( 'manage_options' ) ) {
2102
+ wp_send_json_error( null, 403 );
2103
+ }
2104
2105
+ update_site_option( 'wp_super_cache_index_detected', 3 );
2106
+ die( 0 );
2107
2108
add_action( 'wp_ajax_wpsc-index-dismiss', 'wpsc_dismiss_indexhtml_warning' );
2109
0 commit comments