Kiwi Social Share – Social Media Share Buttons & Icons - Version 2.1.1

Version Description

  • Fixed security issue
Download this release

Release Info

Developer wpkube
Plugin Icon wp plugin Kiwi Social Share – Social Media Share Buttons & Icons
Version 2.1.1
Comparing to
See all releases

Code changes from version 2.1.0 to 2.1.1

includes/lib/helpers/class-kiwi-social-share-helper.php CHANGED
@@ -427,14 +427,23 @@ class Kiwi_Social_Share_Helper {
427
  }
428
 
429
  add_action( 'wp_ajax_kiwi_social_share_get_option', 'kiwi_social_share_get_option' );
430
- add_action( 'wp_ajax_nopriv_kiwi_social_share_get_option', 'kiwi_social_share_get_option' );
431
  add_action( 'wp_ajax_kiwi_social_share_set_option', 'kiwi_social_share_set_option' );
432
- add_action( 'wp_ajax_nopriv_kiwi_social_share_set_option', 'kiwi_social_share_set_option' );
433
 
434
  /**
435
  *
436
  */
437
  function kiwi_social_share_get_option() {
 
 
 
 
 
 
 
 
 
 
 
438
  if ( !empty( $_POST ) && $_POST[ 'action' ] === 'kiwi_social_share_get_option' ) {
439
  wp_die( json_encode( Kiwi_Social_Share_Helper::get_setting_value( $_POST[ 'args' ][ 'option' ], $_POST[ 'args' ][ 'default' ], $_POST[ 'args' ][ 'group' ] ) ) );
440
  }
@@ -443,6 +452,17 @@ function kiwi_social_share_get_option() {
443
  }
444
 
445
  function kiwi_social_share_set_option() {
 
 
 
 
 
 
 
 
 
 
 
446
  if ( !empty( $_POST ) && $_POST[ 'action' ] === 'kiwi_social_share_set_option' ) {
447
  $option = get_option( $_POST[ 'args' ][ 'group' ] );
448
  $option[ $_POST[ 'args' ][ 'option' ] ] = $_POST[ 'args' ][ 'value' ];
427
  }
428
 
429
  add_action( 'wp_ajax_kiwi_social_share_get_option', 'kiwi_social_share_get_option' );
 
430
  add_action( 'wp_ajax_kiwi_social_share_set_option', 'kiwi_social_share_set_option' );
 
431
 
432
  /**
433
  *
434
  */
435
  function kiwi_social_share_get_option() {
436
+
437
+ $allowed_options = array( 'kiwi_social_identities' );
438
+
439
+ if ( ! in_array( $_POST['args']['group'], $allowed_options ) ) {
440
+ wp_die( 'Forbidden' );
441
+ }
442
+
443
+ if ( ! current_user_can( 'edit_posts' ) ) {
444
+ wp_die( 'Forbidden' );
445
+ }
446
+
447
  if ( !empty( $_POST ) && $_POST[ 'action' ] === 'kiwi_social_share_get_option' ) {
448
  wp_die( json_encode( Kiwi_Social_Share_Helper::get_setting_value( $_POST[ 'args' ][ 'option' ], $_POST[ 'args' ][ 'default' ], $_POST[ 'args' ][ 'group' ] ) ) );
449
  }
452
  }
453
 
454
  function kiwi_social_share_set_option() {
455
+
456
+ if ( ! current_user_can( 'manage_options' ) ) {
457
+ wp_die( 'Forbidden' );
458
+ }
459
+
460
+ $allowed_options = array( 'kiwi_registration' );
461
+
462
+ if ( ! in_array( $_POST['args']['group'], $allowed_options ) ) {
463
+ wp_die( 'Forbidden' );
464
+ }
465
+
466
  if ( !empty( $_POST ) && $_POST[ 'action' ] === 'kiwi_social_share_set_option' ) {
467
  $option = get_option( $_POST[ 'args' ][ 'group' ] );
468
  $option[ $_POST[ 'args' ][ 'option' ] ] = $_POST[ 'args' ][ 'value' ];
kiwi-social-share.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Kiwi Social Share - Social Media Share Buttons & Icons
4
- * Version: 2.1.0
5
  * Description: Really beautiful & simple social media & share buttons + icons. Simplicity & speed is key with this social media share plugin.
6
  * Author: WPKube
7
  * Author URI: https://www.wpkube.com/
@@ -58,7 +58,7 @@ require_once 'includes/class-kiwi-social-share-autoloader.php';
58
  * @return object Kiwi_Social_Share
59
  */
60
  function Kiwi_Social_Share() {
61
- $instance = Kiwi_Social_Share::instance( __FILE__, '2.1.0' );
62
 
63
  if ( is_null( $instance->settings ) ) {
64
  $instance->settings = Kiwi_Social_Share_Settings::instance( $instance );
1
  <?php
2
  /*
3
  * Plugin Name: Kiwi Social Share - Social Media Share Buttons & Icons
4
+ * Version: 2.1.1
5
  * Description: Really beautiful & simple social media & share buttons + icons. Simplicity & speed is key with this social media share plugin.
6
  * Author: WPKube
7
  * Author URI: https://www.wpkube.com/
58
  * @return object Kiwi_Social_Share
59
  */
60
  function Kiwi_Social_Share() {
61
+ $instance = Kiwi_Social_Share::instance( __FILE__, '2.1.1' );
62
 
63
  if ( is_null( $instance->settings ) ) {
64
  $instance->settings = Kiwi_Social_Share_Settings::instance( $instance );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: wpkube
4
  Tags: social media button, social share button, social floating bar, social share bar, facebook share, social sharing icons, twitter share, woocommerce sharing, share buttons, pinterest share, social share counters
5
  Requires at least: 3.8
6
  Tested up to: 5.7
7
- Stable tag: 2.1.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -78,6 +78,9 @@ Floating Bar Filters
78
 
79
  == Changelog ==
80
 
 
 
 
81
  = 2.1.0 =
82
  * All PRO features are now available in this version
83
 
4
  Tags: social media button, social share button, social floating bar, social share bar, facebook share, social sharing icons, twitter share, woocommerce sharing, share buttons, pinterest share, social share counters
5
  Requires at least: 3.8
6
  Tested up to: 5.7
7
+ Stable tag: 2.1.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
78
 
79
  == Changelog ==
80
 
81
+ = 2.1.1 =
82
+ * Fixed security issue
83
+
84
  = 2.1.0 =
85
  * All PRO features are now available in this version
86