Skip to content

Commit

Permalink
Avoid possible XSS via shortcode eme_events and the format option
Browse files Browse the repository at this point in the history
  • Loading branch information
liedekef committed Dec 12, 2023
1 parent e1f6162 commit 9fb0491
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eme-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -4694,6 +4694,9 @@ function eme_get_events_list_shortcode( $atts ) {

// if format is given as argument, sometimes people need url-encoded strings inside so WordPress doesn't get confused, so we decode them here again
$format = urldecode( $format );
// to avoid shortcode-XSS by a contributor (eme_strip_js is identical to eme_kses, so we call that)
$format = eme_kses( $format );

// for format: sometimes people want to give placeholders as options, but when using the shortcode inside
// another (e.g. when putting[eme_events format="#_EVENTNAME"] inside the "display single event" setting,
// the replacement of the placeholders happens too soon (placeholders get replaced first, before any other
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ See the FAQ section at the [Official site](https://www.e-dynamics.be/wordpress/)
= 2.4.19 (2023//) =
* Added a new recurrence period "specific months", so you can choose on which months something transpires and repeat per year
* Avoid php warnings if an image for an event/person/location/... no longer exists
* Avoid possible XSS via shortcode eme_events and the format option

= 2.4.18 (2023/12/10) =
* Fix a php warning
Expand Down

0 comments on commit 9fb0491

Please sign in to comment.