Skip to content

Commit

Permalink
Merge branch 'fix/query-vulnerability'
Browse files Browse the repository at this point in the history
  • Loading branch information
gsarig committed Dec 12, 2024
2 parents cfa34d0 + 465cc8d commit 9d4eb5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions includes/classes/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,12 @@ public function shortcode( $attrs ) {
'queryArgs' => $queryArgs,
];

$escaped_attrs = array_map( 'esc_attr', $attrs );

$content = sprintf(
'<div class="ootb-openstreetmap--map" %1$s style="height: %2$s;"></div>',
self::default_attrs( $attrs ),
$attrs[ 'height' ]
self::default_attrs( $escaped_attrs ),
$escaped_attrs[ 'height' ]
);

return $this->render_callback( $render_callback_attrs, $content );
Expand Down
4 changes: 2 additions & 2 deletions ootb-openstreetmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: A map block for the Gutenberg Editor using OpenStreetMaps and Leaflet that needs no API keys and works out of the box.
* Requires at least: 6.5
* Requires PHP: 7.4
* Version: 2.8.3
* Version: 2.8.4
* Author: Giorgos Sarigiannidis
* Author URI: https://www.gsarigiannidis.gr
* License: GPL-2.0-or-later
Expand All @@ -21,7 +21,7 @@
define( 'OOTB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );

const OOTB_BLOCK_NAME = 'ootb/openstreetmap';
const OOTB_VERSION = '2.8.3';
const OOTB_VERSION = '2.8.4';
const OOTB_SCRIPT_VERSION = [
'leaflet' => '1.9.4',
'leaflet-gesture-handling' => '1.4.4',
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: Map, OpenStreetMap, Leaflet, Google Maps, block
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 2.8.3
Stable tag: 2.8.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -139,6 +139,9 @@ Version 2.0.0 is a major, almost full, refactoring, both for the build scripts a
= 1.0 =

== Changelog ==
= 2.8.4 =
* Security update. Fixes a vulnerability which allows authenticated attackers with contributor permissions or above to insert JavaScript that triggers when accessing the web-page by mouse.

= 2.8.3 =
* Bumps support to WordPress 6.7.
* Bumps minimum supported WordPress version to 6.5.
Expand Down

0 comments on commit 9d4eb5d

Please sign in to comment.