re-use existing nonce!

This commit is contained in:
Matthias Pfefferle 2023-11-09 15:58:27 +01:00
parent d2299436a7
commit 32d8e7c3f0
3 changed files with 3 additions and 5 deletions

View file

@ -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;
}

View file

@ -24,6 +24,5 @@ $followers_template = _n( 'Your blog profile currently has %s follower.', 'Your
$table->search_box( 'Search', 'search' );
$table->display();
?>
<?php wp_nonce_field( 'activitypub-followers-list', '_apnonce' ); ?>
</form>
</div>

View file

@ -17,6 +17,5 @@ $followers_template = _n( 'Your author profile currently has %s follower.', 'You
$table->search_box( 'Search', 'search' );
$table->display();
?>
<?php wp_nonce_field( 'activitypub-followers-list', '_apnonce' ); ?>
</form>
</div>