Skip to content

Commit 3d89ea1

Browse files
authored
v0.5.8.2 - Merge pull request #119 from JoryHogeveen/dev
v0.5.8.2
2 parents f0fa263 + c3e41d6 commit 3d89ea1

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

includes/class-control-trigger.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ private function __construct() { }
9393
* @todo Refactor to enable above checks?
9494
*
9595
* @since 0.4.0
96-
* @since 0.5.0 Add icon options.
97-
* @since 0.5.1 Moved to this class and renamed from `do_control_trigger()`.
96+
* @since 0.5.0 Add icon options.
97+
* @since 0.5.1 Moved to this class and renamed from `do_control_trigger()`.
98+
* @since 0.5.8.2 Added escaping for passed attributes.
9899
* @static
99100
*
100101
* @param string $sidebar_id Required.
@@ -121,9 +122,14 @@ public static function render( $sidebar_id, $args = array() ) {
121122

122123
$args = wp_parse_args( $args, $defaults );
123124

124-
$args['attr'] = off_canvas_sidebars_parse_attr_string( $args['attr'] );
125+
$args['element'] = strtolower( $args['element'] );
126+
$args['attr'] = off_canvas_sidebars_parse_attr_string( $args['attr'] );
127+
$args['text'] = wp_kses_post( $args['text'] );
125128

126-
if ( in_array( $args['element'], self::$unsupported_elements, true ) ) {
129+
if (
130+
in_array( $args['element'], self::$unsupported_elements, true )
131+
|| ! preg_match( '/^[\w]*$/', $args['element'] )
132+
) {
127133
return '<span class="error">' . esc_html__( 'This element is not supported for use as a button', OCS_DOMAIN ) . '</span>';
128134
}
129135

off-canvas-sidebars.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
* @author Jory Hogeveen <[email protected]>
44
* @package Off_Canvas_Sidebars
55
* @since 0.1.0
6-
* @version 0.5.8.1
6+
* @version 0.5.8.2
77
* @licence GPL-2.0+
88
* @link https://github.com/JoryHogeveen/off-canvas-sidebars
99
*
1010
* @wordpress-plugin
1111
* Plugin Name: Off-Canvas Sidebars & Menus (Slidebars)
1212
* Description: Add off-canvas sidebars using the Slidebars jQuery plugin
1313
* Plugin URI: https://wordpress.org/plugins/off-canvas-sidebars/
14-
* Version: 0.5.8.1
14+
* Version: 0.5.8.2
1515
* Author: Jory Hogeveen
1616
* Author URI: http://www.keraweb.nl
1717
* Text Domain: off-canvas-sidebars
@@ -44,7 +44,7 @@
4444

4545
if ( ! class_exists( 'OCS_Off_Canvas_Sidebars' ) && ! function_exists( 'off_canvas_sidebars' ) ) {
4646

47-
define( 'OCS_PLUGIN_VERSION', '0.5.8.1' );
47+
define( 'OCS_PLUGIN_VERSION', '0.5.8.2' );
4848
define( 'OCS_DOMAIN', 'off-canvas-sidebars' );
4949
define( 'OCS_FILE', __FILE__ );
5050
define( 'OCS_BASENAME', plugin_basename( OCS_FILE ) );

readme.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Contributors: keraweb
33
Donate link: https://www.keraweb.nl/donate.php?for=off-canvas-sidebars
44
Tags: off-canvas, menus, widgets, sidebars, slidebars, panels, jQuery, app, mobile, tablet, responsive, genesis
55
Requires at least: 4.1
6-
Tested up to: 6.3
6+
Tested up to: 6.4
77
Requires PHP: 5.2.4
8-
Stable tag: 0.5.8.1
8+
Stable tag: 0.5.8.2
99

1010
Add off-canvas sidebars (Slidebars) containing widgets, menus or other content using the Slidebars jQuery plugin.
1111

@@ -91,6 +91,12 @@ For more advanced customisations either:
9191

9292
== Changelog ==
9393

94+
= 0.5.8.2 =
95+
96+
* **Hotfix:** Security fix (contributor+ users only).
97+
98+
Detailed info: [PR on GitHub](https://github.com/JoryHogeveen/off-canvas-sidebars/pull/119)
99+
94100
= 0.5.8.1 =
95101

96102
* **Fix:** Incomplete merge of JS code.

0 commit comments

Comments
 (0)