Plugin Directory

Changeset 2230136


Ignore:
Timestamp:
01/20/2020 09:19:44 AM (6 years ago)
Author:
orenhav
Message:

add nonce check for terms update

Location:
oh-add-script-header-footer/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • oh-add-script-header-footer/trunk/oh-add-script-header-footer.php

    r2212294 r2230136  
    55 * Description:  create a simple way to add js code to individual page post or custom post type header
    66 * and footer, in this way it enable you to add google re-marketing code to individual pages
    7  * Version: 3.8
     7 * Version: 3.9
    88 * Author: orenhav (SOGO)
    99 * Author URI: http://sogo.co.il
  • oh-add-script-header-footer/trunk/oh-terms-settings.php

    r1760618 r2230136  
    2626
    2727    function update_category_meta( $term_id ) {
     28        // Secondly we need to check if the user intended to change this value.
     29        if ( ! isset( $_POST['oh_add_script_noncename'] ) || ! wp_verify_nonce( $_POST['oh_add_script_noncename'], plugin_basename( __FILE__ ) ) )
     30            return;
    2831
    2932        if ( isset( $_POST['oh-hide-header'] ) && '' !== $_POST['oh-hide-header'] ) {
     
    6063        $header      = get_term_meta( $term->term_id, 'oh-header-script', true );
    6164        $footer      = get_term_meta( $term->term_id, 'oh-footer-script', true );
    62 
     65        wp_nonce_field( plugin_basename( __FILE__ ), 'oh_add_script_noncename' );
    6366        ?>
    6467
  • oh-add-script-header-footer/trunk/readme.txt

    r2212294 r2230136  
    55Requires at least: 3.5
    66Tested up to: 5.3.1
    7 Stable tag: 3.8
     7Stable tag: 3.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    106106Test support for last WordPress version
    107107
     108= 3.9 =
     109add nonce check for terms update
     110
    108111== Upgrade Notice ==
    109112
Note: See TracChangeset for help on using the changeset viewer.