From 32d8e7c3f08f3f34f65511f219d6d27eb82ff71a Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Thu, 9 Nov 2023 15:58:27 +0100 Subject: [PATCH] re-use existing nonce! --- includes/table/class-followers.php | 6 +++--- templates/blog-user-followers-list.php | 1 - templates/user-followers-list.php | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/table/class-followers.php b/includes/table/class-followers.php index 60b7adf..bdcd4e1 100644 --- a/includes/table/class-followers.php +++ b/includes/table/class-followers.php @@ -141,11 +141,11 @@ class Followers extends WP_List_Table { } public function process_action() { - if ( ! isset( $_REQUEST['followers'] ) || ! isset( $_REQUEST['_apnonce'] ) ) { + if ( ! isset( $_REQUEST['followers'] ) || ! isset( $_REQUEST['_wpnonce'] ) ) { return false; } - $nonce = sanitize_text_field( wp_unslash( $_REQUEST['_apnonce'] ) ); - if ( ! wp_verify_nonce( $nonce, 'activitypub-followers-list' ) ) { + $nonce = sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ); + if ( ! wp_verify_nonce( $nonce, 'bulk-' . $this->_args['plural'] ) ) { return false; } diff --git a/templates/blog-user-followers-list.php b/templates/blog-user-followers-list.php index 9f3b0e5..1eaa7ee 100644 --- a/templates/blog-user-followers-list.php +++ b/templates/blog-user-followers-list.php @@ -24,6 +24,5 @@ $followers_template = _n( 'Your blog profile currently has %s follower.', 'Your $table->search_box( 'Search', 'search' ); $table->display(); ?> - diff --git a/templates/user-followers-list.php b/templates/user-followers-list.php index 459097e..8ea35a7 100644 --- a/templates/user-followers-list.php +++ b/templates/user-followers-list.php @@ -17,6 +17,5 @@ $followers_template = _n( 'Your author profile currently has %s follower.', 'You $table->search_box( 'Search', 'search' ); $table->display(); ?> -