Plugin Directory

Changeset 1597440


Ignore:
Timestamp:
02/16/2017 05:15:27 PM (9 years ago)
Author:
takien
Message:

Updated to 1.7
Add filter to the option values to prevent security issues (Vulnerability reported by Manuel Garcia Cardenas)

Location:
easy-table/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • easy-table/trunk/easy-table.php

    r1334387 r1597440  
    55Description: Create table in post, page, or widget in easy way.
    66Author: Takien
    7 Version: 1.6
     7Version: 1.7
    88Author URI: http://takien.com/
    99*/
     
    107107    $easy_table_base = Array(
    108108                'name'          => 'Easy Table',
    109                 'version'       => '1.6',
     109                'version'       => '1.7',
    110110                'plugin-domain' => 'easy-table'
    111111    );
     
    583583/**
    584584* Register plugin setting
     585* @since: 1.7 add sanitize_callback
    585586*/
    586587function easy_table_register_setting() {
    587     register_setting('easy_table_option_field', 'easy_table_plugin_option');
    588 }
    589 
     588    $args = array('sanitize_callback'=> array(&$this,'easy_table_sanitize_callback'));
     589    register_setting('easy_table_option_field', 'easy_table_plugin_option', $args);
     590}
     591
     592/**
     593* Add sanitize_callback to register_setting to filter the options value
     594* @since: 1.7
     595*/
     596
     597function easy_table_sanitize_callback ( $value ) {
     598    if(is_array($value)) {
     599        $value = filter_var( $value,FILTER_CALLBACK, array("options"=>"strip_tags"));
     600    }
     601    else {
     602        $value = strip_tags( $value );
     603    }
     604    return $value;
     605}
    590606/**
    591607* Render form
  • easy-table/trunk/readme.txt

    r1334387 r1597440  
    33Donate link: http://takien.com/donate
    44Tags: table,csv,csv-to-table,post,excel,csv file,widget,tablesorter
    5 Requires at least: 3.0
    6 Tested up to: 4.4.1
    7 Stable tag: 1.6
     5Requires at least: 4.0
     6Tested up to: 4.7.2
     7Stable tag: 1.7
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    249249== Changelog ==
    250250
     251= 1.7 =
     252* Add filter to the option values to prevent security issues (Vulnerability reported by Manuel Garcia Cardenas)
     253
    251254= 1.6 =
    252255* Added: exclude_row, exclude_col argument. Useful to hide sort of rows or columns from your data.
Note: See TracChangeset for help on using the changeset viewer.