Easy Table - Version 1.7

Version Description

  • Add filter to the option values to prevent security issues (Vulnerability reported by Manuel Garcia Cardenas)
Download this release

Release Info

Developer takien
Plugin Icon wp plugin Easy Table
Version 1.7
Comparing to
See all releases

Code changes from version 1.6 to 1.7

Files changed (2) hide show
  1. easy-table.php +19 -3
  2. readme.txt +6 -3
easy-table.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Easy Table
4
  Plugin URI: http://takien.com/
5
  Description: Create table in post, page, or widget in easy way.
6
  Author: Takien
7
- Version: 1.6
8
  Author URI: http://takien.com/
9
  */
10
 
@@ -106,7 +106,7 @@ function __construct(){
106
  private function easy_table_base($return){
107
  $easy_table_base = Array(
108
  'name' => 'Easy Table',
109
- 'version' => '1.6',
110
  'plugin-domain' => 'easy-table'
111
  );
112
  return $easy_table_base[$return];
@@ -582,11 +582,27 @@ function theme_content() {
582
  }
583
  /**
584
  * Register plugin setting
 
585
  */
586
  function easy_table_register_setting() {
587
- register_setting('easy_table_option_field', 'easy_table_plugin_option');
 
588
  }
589
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
590
  /**
591
  * Render form
592
  * @param array
4
  Plugin URI: http://takien.com/
5
  Description: Create table in post, page, or widget in easy way.
6
  Author: Takien
7
+ Version: 1.7
8
  Author URI: http://takien.com/
9
  */
10
 
106
  private function easy_table_base($return){
107
  $easy_table_base = Array(
108
  'name' => 'Easy Table',
109
+ 'version' => '1.7',
110
  'plugin-domain' => 'easy-table'
111
  );
112
  return $easy_table_base[$return];
582
  }
583
  /**
584
  * Register plugin setting
585
+ * @since: 1.7 add sanitize_callback
586
  */
587
  function easy_table_register_setting() {
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
+
597
+ function 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
+ }
606
  /**
607
  * Render form
608
  * @param array
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: takien
3
  Donate link: http://takien.com/donate
4
  Tags: 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
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -248,6 +248,9 @@ No
248
 
249
  == Changelog ==
250
 
 
 
 
251
  = 1.6 =
252
  * Added: exclude_row, exclude_col argument. Useful to hide sort of rows or columns from your data.
253
  * Added: sslverify=false to wp_remote_get $args
2
  Contributors: takien
3
  Donate link: http://takien.com/donate
4
  Tags: table,csv,csv-to-table,post,excel,csv file,widget,tablesorter
5
+ Requires at least: 4.0
6
+ Tested up to: 4.7.2
7
+ Stable tag: 1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
248
 
249
  == Changelog ==
250
 
251
+ = 1.7 =
252
+ * Add filter to the option values to prevent security issues (Vulnerability reported by Manuel Garcia Cardenas)
253
+
254
  = 1.6 =
255
  * Added: exclude_row, exclude_col argument. Useful to hide sort of rows or columns from your data.
256
  * Added: sslverify=false to wp_remote_get $args