Skip to content

Commit a900e04

Browse files
committed
3.8.2
1 parent dd34bf4 commit a900e04

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ To auto post to Instagram and/or Pinterest, [Upgrade to WordPress to Buffer Pro]
137137

138138
== Changelog ==
139139

140+
= 3.8.2 (2022-06-21) =
141+
* Fix: Status: Correctly sanitize and escape status textarea field value to prevent possible XSS
142+
140143
= 3.8.1 (2022-06-09) =
141144
* Added: Support for WordPress 6.0
142145

vendor/includes/admin/settings.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ public function get_settings( $type ) {
291291
*/
292292
public function update_settings( $type, $settings ) {
293293

294+
// Iterate through array of Post Type Settings to strip HTML tags.
295+
$settings = $this->strip_tags_deep( $settings );
296+
294297
/**
295298
* Filters Post Type Settings before they are saved.
296299
*
@@ -341,6 +344,20 @@ public function update_settings( $type, $settings ) {
341344

342345
}
343346

347+
/**
348+
* Strip HTML tags from the given array or string.
349+
*
350+
* @since 4.8.9
351+
*
352+
* @param string|array $value Setting value.
353+
* @return string Setting value
354+
*/
355+
private function strip_tags_deep( $value ) {
356+
357+
return is_array( $value ) ? array_map( array( $this, 'strip_tags_deep' ), $value ) : wp_strip_all_tags( $value );
358+
359+
}
360+
344361
/**
345362
* Returns an array of default settings for a new installation.
346363
*

wp-to-buffer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: WP to Buffer
44
* Plugin URI: http://www.wpzinc.com/plugins/wp-to-buffer-pro
5-
* Version: 3.8.1
5+
* Version: 3.8.2
66
* Author: WP Zinc
77
* Author URI: http://www.wpzinc.com
88
* Description: Send WordPress Pages, Posts or Custom Post Types to your Buffer (buffer.com) account for scheduled publishing to social networks.
@@ -74,8 +74,8 @@ public function __construct() {
7474

7575
$this->plugin->settingsName = 'wp-to-buffer-pro'; // Settings key - used in both Free + Pro, and for oAuth
7676
$this->plugin->account = 'Buffer';
77-
$this->plugin->version = '3.8.1';
78-
$this->plugin->buildDate = '2022-06-09 18:00:00';
77+
$this->plugin->version = '3.8.2';
78+
$this->plugin->buildDate = '2022-06-21 18:00:00';
7979
$this->plugin->requires = '5.0';
8080
$this->plugin->tested = '6.0';
8181
$this->plugin->folder = plugin_dir_path( __FILE__ );

0 commit comments

Comments
 (0)