From 3d660ec0dfe838ad70be66431f1f5a90f85bab1e Mon Sep 17 00:00:00 2001 From: Fabio Rinaldi Date: Thu, 2 Jan 2025 12:03:34 +0100 Subject: [PATCH] Fix XSS vulnerability --- crellyslider.php | 4 ++-- readme.txt | 7 +++++-- wordpress/elements.php | 10 +++++----- wordpress/frontend.php | 6 +++--- wordpress/slides.php | 2 +- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/crellyslider.php b/crellyslider.php index 95a5d33..dde6b22 100644 --- a/crellyslider.php +++ b/crellyslider.php @@ -3,7 +3,7 @@ * Plugin Name: Crelly Slider * Plugin URI: https://wordpress.org/plugins/crelly-slider/ * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations. - * Version: 1.4.6 + * Version: 1.4.7 * Author: Fabio Rinaldi * Author URI: https://github.com/fabiorino * Text Domain: crelly-slider @@ -18,7 +18,7 @@ define('CS_DEBUG', true); -define('CS_VERSION', '1.4.6'); +define('CS_VERSION', '1.4.7'); define('CS_MIN_CAPABILITY', 'manage_options'); define('CS_PATH', plugin_dir_path(__FILE__)); define('CS_PLUGIN_URL', plugins_url() . '/crelly-slider'); diff --git a/readme.txt b/readme.txt index 76a8893..2a3a9ff 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: fabiorino Donate link: http://crellyslider.altervista.org/contribute-and-support/ Tags: slider, layers, animations, transitions, texts, images, videos Requires at least: 4.6 -Tested up to: 6.5 -Stable tag: 1.4.6 +Tested up to: 6.7 +Stable tag: 1.4.7 License: MIT License URI: http://opensource.org/licenses/MIT @@ -54,6 +54,9 @@ You can find the documentation background_type_image)); + $background_url = esc_url(CrellySliderCommon::getURL(stripslashes($slide->background_type_image))); ?> style=" @@ -36,7 +36,7 @@ class="cs-slide-editing-area" $link_output = ' <?php echo esc_attr($element->image_alt); ?> '; - else echo ''; + else echo ''; ?>
'; - else echo ''; + else echo ''; ?>
link != '') { if($slide->link_new_tab) { - $output .= '
'; + $output .= ''; } else { - $output .= ''; + $output .= ''; } } @@ -112,7 +112,7 @@ public static function output($alias) { 'data-top="' . esc_attr($element->data_top) . '"' . "\n" . 'data-left="' . esc_attr($element->data_left) . '"' . "\n" . 'data-time="' . esc_attr($element->data_time) . '"' . "\n" . - 'href="' . stripslashes($element->link) . '"' . "\n" . + 'href="' . esc_url($element->link) . '"' . "\n" . $target . "\n" . 'style="' . 'z-index: ' . $element->z_index . ';' . "\n" . diff --git a/wordpress/slides.php b/wordpress/slides.php index 5e1b8cd..65dd598 100644 --- a/wordpress/slides.php +++ b/wordpress/slides.php @@ -286,7 +286,7 @@ function crellyslider_printSlide($slider, $slide, $edit) { '; - else echo ''; + else echo ''; ?>