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

Version Description

  • Fixed security issues
  • Code cleanup
Download this release

Release Info

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

Code changes from version 2.1.2 to 2.1.3

includes/backend/kiwi-social-share-backend.php CHANGED
@@ -27,7 +27,7 @@ if ( ! defined( 'ABSPATH' ) ) {
27
  if ( ! empty( $_COOKIE ) && ! empty( $_COOKIE['tab'] ) ) {
28
 
29
  // get tab cookie value
30
- $hash = esc_html( $_COOKIE['tab'] );
31
 
32
  // define allowed values for the tab cookie
33
  $allowed_hash = array(
27
  if ( ! empty( $_COOKIE ) && ! empty( $_COOKIE['tab'] ) ) {
28
 
29
  // get tab cookie value
30
+ $hash = sanitize_text_field( $_COOKIE['tab'] );
31
 
32
  // define allowed values for the tab cookie
33
  $allowed_hash = array(
includes/frontend/social-bars/class-kiwi-social-share-view-article-bar.php CHANGED
@@ -177,9 +177,9 @@ final class Kiwi_Social_Share_View_Article_Bar extends Kiwi_Social_Share_View im
177
 
178
 
179
  if ($this->check_if_woocommerce_product() == true) {
180
- echo $output;
181
  } else {
182
- return $output;
183
  }
184
 
185
  }
177
 
178
 
179
  if ($this->check_if_woocommerce_product() == true) {
180
+ echo wp_kses_post( $output );
181
  } else {
182
+ return wp_kses_post( $output );
183
  }
184
 
185
  }
includes/frontend/social-bars/class-kiwi-social-share-view-floating-bar.php CHANGED
@@ -124,7 +124,7 @@ final class Kiwi_Social_Share_View_Floating_Bar extends Kiwi_Social_Share_View i
124
 
125
  $output .= wp_kses_post( apply_filters( 'kiwi_after_floating_bar', '' ) );
126
 
127
- echo $output;
128
  }
129
 
130
 
124
 
125
  $output .= wp_kses_post( apply_filters( 'kiwi_after_floating_bar', '' ) );
126
 
127
+ echo wp_kses_post( $output );
128
  }
129
 
130
 
includes/frontend/social-bars/class-kiwi-social-share-view-shortcode-bar.php CHANGED
@@ -70,7 +70,7 @@ final class Kiwi_Social_Share_View_Shortcode_Bar extends Kiwi_Social_Share_View
70
  }
71
  $output .= '</ul>';
72
 
73
- return $output;
74
  }
75
 
76
  }
70
  }
71
  $output .= '</ul>';
72
 
73
+ return wp_kses_post( $output );
74
  }
75
 
76
  }
includes/lib/class-kiwi-social-share-frontend.php CHANGED
@@ -83,12 +83,12 @@ class Kiwi_Social_Share_Frontend {
83
  $info['header_output'] .= PHP_EOL . '<!-- Twitter OG tags by Kiwi Social Sharing Plugin -->';
84
 
85
  $info['header_output'] .= PHP_EOL . '<meta name="twitter:card" content="summary" />';
86
- $info['header_output'] .= PHP_EOL . '<meta name="twitter:title" content="' . trim( $info['title'] ) . '" />';
87
  $info['header_output'] .= PHP_EOL . '<meta name="twitter:url" content="' . esc_url( $url ) . '" />';
88
 
89
  if ( ! empty( $info['user_twitter_handle'] ) ) {
90
- $info['header_output'] .= PHP_EOL . '<meta name="twitter:site" content="' . trim( $info['user_twitter_handle'] ) . '" />';
91
- $info['header_output'] .= PHP_EOL . '<meta name="twitter:creator" content="' . trim( $info['user_twitter_handle'] ) . '" />';
92
  }
93
 
94
  if ( ! empty( $info['twitter_description'] ) ) {
@@ -108,12 +108,12 @@ class Kiwi_Social_Share_Frontend {
108
  // Open Graph Title: Create an open graph title meta tag
109
  if ( $info['title'] ) {
110
  // If nothing else is defined, let's use the post title
111
- $info['header_output'] .= PHP_EOL . '<meta property="og:title" content="' . Kiwi_Social_Share_Helper::convert_smart_quotes( htmlspecialchars_decode( get_the_title() ) ) . '" />';
112
  }
113
 
114
  if ( $info['description'] ) {
115
  // If nothing else is defined, let's use the post excerpt
116
- $info['header_output'] .= PHP_EOL . '<meta property="og:description" content="' . Kiwi_Social_Share_Helper::convert_smart_quotes( $info['description'] ) . '" />';
117
  }
118
 
119
  if ( has_post_thumbnail( $info['postID'] ) ) {
@@ -132,18 +132,26 @@ class Kiwi_Social_Share_Frontend {
132
 
133
  // add facebook app id
134
  if ( ! empty( $info['fb_app_id'] ) ) {
135
- $info['header_output'] .= PHP_EOL . '<meta property = "fb:app_id" content="' . trim( $info['fb_app_id'] ) . '" />';
136
  }
137
 
138
  // add facebook url
139
  if ( ! empty( $info['fp_url'] ) ) {
140
- $info['header_output'] .= PHP_EOL . '<meta property="article:publisher" content="' . trim( $info['fp_url'] ) . '" />';
141
  }
142
 
143
  // append the closing comment :)
144
  $info['header_output'] .= PHP_EOL . '<!--/end meta tags by Kiwi Social Sharing Plugin -->';
145
  // Return the variable containing our information for the meta tags
146
- echo $info['header_output'] . PHP_EOL;
 
 
 
 
 
 
 
 
147
  }
148
  }
149
  }
83
  $info['header_output'] .= PHP_EOL . '<!-- Twitter OG tags by Kiwi Social Sharing Plugin -->';
84
 
85
  $info['header_output'] .= PHP_EOL . '<meta name="twitter:card" content="summary" />';
86
+ $info['header_output'] .= PHP_EOL . '<meta name="twitter:title" content="' . esc_attr( trim( $info['title'] ) ) . '" />';
87
  $info['header_output'] .= PHP_EOL . '<meta name="twitter:url" content="' . esc_url( $url ) . '" />';
88
 
89
  if ( ! empty( $info['user_twitter_handle'] ) ) {
90
+ $info['header_output'] .= PHP_EOL . '<meta name="twitter:site" content="' . esc_attr( trim( $info['user_twitter_handle'] ) ) . '" />';
91
+ $info['header_output'] .= PHP_EOL . '<meta name="twitter:creator" content="' . esc_attr( trim( $info['user_twitter_handle'] ) ) . '" />';
92
  }
93
 
94
  if ( ! empty( $info['twitter_description'] ) ) {
108
  // Open Graph Title: Create an open graph title meta tag
109
  if ( $info['title'] ) {
110
  // If nothing else is defined, let's use the post title
111
+ $info['header_output'] .= PHP_EOL . '<meta property="og:title" content="' . esc_attr( Kiwi_Social_Share_Helper::convert_smart_quotes( htmlspecialchars_decode( get_the_title() ) ) ) . '" />';
112
  }
113
 
114
  if ( $info['description'] ) {
115
  // If nothing else is defined, let's use the post excerpt
116
+ $info['header_output'] .= PHP_EOL . '<meta property="og:description" content="' . esc_attr( Kiwi_Social_Share_Helper::convert_smart_quotes( $info['description'] ) ) . '" />';
117
  }
118
 
119
  if ( has_post_thumbnail( $info['postID'] ) ) {
132
 
133
  // add facebook app id
134
  if ( ! empty( $info['fb_app_id'] ) ) {
135
+ $info['header_output'] .= PHP_EOL . '<meta property = "fb:app_id" content="' . esc_attr( trim( $info['fb_app_id'] ) ) . '" />';
136
  }
137
 
138
  // add facebook url
139
  if ( ! empty( $info['fp_url'] ) ) {
140
+ $info['header_output'] .= PHP_EOL . '<meta property="article:publisher" content="' . esc_attr( trim( $info['fp_url'] ) ) . '" />';
141
  }
142
 
143
  // append the closing comment :)
144
  $info['header_output'] .= PHP_EOL . '<!--/end meta tags by Kiwi Social Sharing Plugin -->';
145
  // Return the variable containing our information for the meta tags
146
+
147
+ echo wp_kses( $info['header_output'] . PHP_EOL, array(
148
+ 'meta' => array(
149
+ 'property' => array(),
150
+ 'content' => array(),
151
+ 'name' => array(),
152
+ )
153
+ ) );
154
+
155
  }
156
  }
157
  }
includes/lib/class-kiwi-social-share-highlight-share.php CHANGED
@@ -143,6 +143,6 @@ class Kiwi_Social_Share_Highlight_Share {
143
  $html .= '<a href="//twitter.com/intent/tweet?url=%url%&text=%text%' . $additional . '" target="_blank" class="kiwi-nw-twitter" ' . $tracking_html . '><span class="kicon-twitter"></span></a>';
144
  $html .= '</div>';
145
 
146
- echo $html;
147
  }
148
  }
143
  $html .= '<a href="//twitter.com/intent/tweet?url=%url%&text=%text%' . $additional . '" target="_blank" class="kiwi-nw-twitter" ' . $tracking_html . '><span class="kicon-twitter"></span></a>';
144
  $html .= '</div>';
145
 
146
+ echo wp_kses_post( $html );
147
  }
148
  }
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.2
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.2' );
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.3
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.3' );
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.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -78,7 +78,7 @@ Floating Bar Filters
78
 
79
  == Changelog ==
80
 
81
- = 2.1.2 =
82
  * Fixed security issues
83
  * Code cleanup
84
 
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.3
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.3 =
82
  * Fixed security issues
83
  * Code cleanup
84