Skip to content

Commit ab79b75

Browse files
authored
v0.5.8.5 - Merge pull request #122 from JoryHogeveen/dev
v0.5.8.5
2 parents 1c191d1 + 5e4d664 commit ab79b75

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

includes/class-form.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -559,17 +559,18 @@ public static function wrap_fieldset( $html, $args, $attr = array() ) {
559559
*/
560560
public static function get_option_prefixes( $args ) {
561561
$settings = off_canvas_sidebars()->get_settings();
562-
$key = off_canvas_sidebars()->get_general_key();
562+
$key = esc_attr( off_canvas_sidebars()->get_general_key() );
563563
if ( isset( $args['sidebar'] ) ) {
564-
$prefix_name = esc_attr( $key ) . '[sidebars][' . $args['sidebar'] . ']';
565-
$prefix_value = off_canvas_sidebars()->get_sidebars( $args['sidebar'] );
566-
$prefix_id = $key . '_sidebars_' . $args['sidebar'];
564+
$sidebar = esc_attr( $args['sidebar'] );
565+
$prefix_name = $key . '[sidebars][' . $sidebar . ']';
566+
$prefix_value = off_canvas_sidebars()->get_sidebars( $sidebar );
567+
$prefix_id = $key . '_sidebars_' . $sidebar;
567568
$prefix_classes = array(
568-
$key . '_sidebars_' . $args['sidebar'],
569+
$key . '_sidebars_' . $sidebar,
569570
$key . '_sidebars',
570571
);
571572
} else {
572-
$prefix_name = esc_attr( $key );
573+
$prefix_name = $key;
573574
$prefix_value = $settings;
574575
$prefix_id = $key;
575576
$prefix_classes = array(

includes/class-page.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function get_request_tab() {
201201
* @param string $tab
202202
*/
203203
public function set_current_tab( $tab ) {
204-
$this->tab = (string) $tab;
204+
$this->tab = sanitize_title_with_dashes( (string) $tab );
205205
}
206206

207207
/**
@@ -210,7 +210,7 @@ public function set_current_tab( $tab ) {
210210
* @param string $tab
211211
*/
212212
public function set_request_tab( $tab ) {
213-
$this->request_tab = (string) $tab;
213+
$this->request_tab = sanitize_title_with_dashes( (string) $tab );
214214
}
215215

216216
/**
@@ -249,18 +249,18 @@ public function options_page() {
249249
<div class="wrap">
250250
<h1><?php esc_html_e( 'Off-Canvas Sidebars', OCS_DOMAIN ); ?></h1>
251251
<?php $this->plugin_options_tabs(); ?>
252-
<div class="<?php echo $this->plugin_key; ?> container">
252+
<div class="<?php esc_attr_e( $this->plugin_key ); ?> container">
253253

254254
<?php $form_action = apply_filters( 'ocs_page_form_action', 'options.php' ); ?>
255-
<form id="<?php echo $this->general_key; ?>" method="post" action="<?php echo $form_action; ?>" enctype="multipart/form-data">
255+
<form id="<?php esc_attr_e( $this->general_key ); ?>" method="post" action="<?php esc_attr_e( $form_action ); ?>" enctype="multipart/form-data">
256256

257257
<?php settings_errors(); ?>
258258

259259
<?php if ( $do_submit ) { ?>
260260
<p class="alignright"><?php submit_button( null, 'primary', 'submit', false ); ?></p>
261261
<?php } ?>
262262

263-
<input id="ocs_tab" type="hidden" name="ocs_tab" value="<?php echo $this->tab; ?>" />
263+
<input id="ocs_tab" type="hidden" name="ocs_tab" value="<?php esc_attr_e( $this->tab ); ?>" />
264264

265265
<?php do_action( 'ocs_page_form_before' ); ?>
266266

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.4
6+
* @version 0.5.8.5
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.4
14+
* Version: 0.5.8.5
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.4' );
47+
define( 'OCS_PLUGIN_VERSION', '0.5.8.5' );
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.7
6+
Tested up to: 6.8
77
Requires PHP: 5.2.4
8-
Stable tag: 0.5.8.4
8+
Stable tag: 0.5.8.5
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.5 =
95+
96+
* **Hotfix:** Security fix (administrators only).
97+
98+
Detailed info: [PR on GitHub](https://github.com/JoryHogeveen/off-canvas-sidebars/pull/122)
99+
94100
= 0.5.8.4 =
95101

96102
* **Hotfix:** Security fix (registered users with edit capabilities only).

0 commit comments

Comments
 (0)