Making WordPress.org

Changeset 12520


Ignore:
Timestamp:
03/31/2023 01:18:15 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Check for the bulk action nonce after we've verified this is the intended action.

The form uses GET requests and sends over action=-1 for innoculous things like search :( so this is hit for more code paths than just performing actions on the page.

Followup to [12517].
See #6903.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php

    r12519 r12520  
    241241                }
    242242
    243                 check_admin_referer( 'bulk-posts' );
    244 
    245243                $action = array_intersect(
    246244                        [ 'plugin_open', 'plugin_close', 'plugin_disable', 'plugin_reject' ],
    … …  
    251249                        return;
    252250                }
     251
     252                check_admin_referer( 'bulk-posts' );
    253253
    254254                switch( $action ) {
Note: See TracChangeset for help on using the changeset viewer.