Skip to content

Commit 4f7a103

Browse files
committed
Version 0.90.0, fixes xss issue
1 parent c9aa115 commit 4f7a103

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

include/lcp-catlistdisplayer.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ private function content_getter($type, $post, $tag = null, $css_class = null) {
177177
$info = $this->catlist->get_content($post);
178178
break;
179179
case 'excerpt':
180+
# Security vulnerability fix for Stored Cross-Site Scripting
181+
# If a post has this excerpt: alert(/XSS/)
182+
# Another post could use [catlist excerpt_tag='script' excerpt=yes]
183+
# and the XSS would be triggered.
184+
if ( $tag == 'script' ) {
185+
$tag = null;
186+
}
180187
$info = $this->catlist->get_excerpt($post);
181188
if ( ! empty( $info ) ) {
182189
$info = preg_replace('/\[.*\]/', '', $info);

list-category-posts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: List category posts
44
Plugin URI: https://github.com/picandocodigo/List-Category-Posts
55
Description: List Category Posts allows you to list posts by category in a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, the number of posts to display and many more parameters. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
6-
Version: 0.89.9
6+
Version: 0.90.0
77
Author: Fernando Briano
88
Author URI: http://fernandobriano.com
99

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: list, categories, posts, cms
55
Requires at least: 3.3
66
Tested up to: 6.7.1
77
Requires PHP: 5.6
8-
Stable tag: 0.89.9
8+
Stable tag: 0.90.0
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -237,6 +237,10 @@ Template system has changed. Custom templates should be stored in WordPress them
237237

238238
== Changelog ==
239239

240+
= 0.90.0 =
241+
242+
* Fixes a Stored Cross-Site Scripting issue using `excerpt_tag='script'`.
243+
240244
= 0.89.9 =
241245

242246
* Fix deprecation notices caused by tag_escape - https://wordpress.org/support/topic/php-deprecated-preg_replace-passing-null-to-parameter-3/

0 commit comments

Comments
 (0)