Skip to:
Content

BuddyPress.org

Changeset 11869


Ignore:
Timestamp:
02/28/2018 07:25:26 PM (8 years ago)
Author:
dcavins
Message:

Notices Admin List: Add create-specific nonce.

Add a nonce and nonce check that applies only to the creation of new notices.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/classes/class-bp-messages-notices-admin.php

    r11868 r11869  
    116116    public function admin_load() {
    117117        if ( ! empty( $_POST['bp_notice']['send'] ) ) {
     118
     119            check_admin_referer( 'new-notice', 'ns-nonce' );
     120
    118121            $notice = wp_parse_args( $_POST['bp_notice'], array(
    119122                'subject' => '',
     
    162165            <?php endif; ?>
    163166
    164             <form action=<?php echo esc_url( $this->url ); ?> method="post">
     167            <form action=<?php echo esc_url( wp_nonce_url( $this->url, 'new-notice', 'ns-nonce' ) ); ?> method="post">
    165168                <table class="widefat">
    166169                    <tr>
Note: See TracChangeset for help on using the changeset viewer.