Make WordPress Core

Ticket #41387: 41387.patch

File 41387.patch, 819 bytes (added by bobbingwide, 6 years ago)

Don't post the AJAX request if there isn't a nonce

  • src/wp-admin/js/postbox.js

     
    284284                                return;
    285285                        }
    286286
     287                        closedpostboxesnonce = jQuery('#closedpostboxesnonce').val();
     288                        if ( !closedpostboxesnonce ) {
     289                                return;
     290                        }
     291
    287292                        closed = $( '.postbox' ).filter( '.closed' ).map( function() { return this.id; } ).get().join( ',' );
    288293                        hidden = $( '.postbox' ).filter( ':hidden' ).map( function() { return this.id; } ).get().join( ',' );
    289294
     
    291296                                action: 'closed-postboxes',
    292297                                closed: closed,
    293298                                hidden: hidden,
    294                                 closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
     299                                closedpostboxesnonce: closedpostboxesnone,
    295300                                page: page
    296301                        });
    297302                },