diff --git a/src/classes/api/endpoints/class-tainacan-rest-background-processes-controller.php b/src/classes/api/endpoints/class-tainacan-rest-background-processes-controller.php index e127bb439..7f237fa78 100644 --- a/src/classes/api/endpoints/class-tainacan-rest-background-processes-controller.php +++ b/src/classes/api/endpoints/class-tainacan-rest-background-processes-controller.php @@ -192,8 +192,8 @@ class REST_Background_Processes_Controller extends REST_Controller { $process_type = ''; if (isset($request['search'])) { $name = $request['search']; - $process_type = "AND name LIKE '%$name%'"; - $process_type = $wpdb->prepare($process_type); + $search_term_like = '%' . $wpdb->esc_like($name) . '%'; + $process_type = $wpdb->prepare("AND name LIKE %s", $search_term_like); } $recent_q = ''; diff --git a/src/readme.txt b/src/readme.txt index d3853b026..091600898 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -4,7 +4,7 @@ Tags: museums, archives, GLAM, collections, repository Requires at least: 5.9 Tested up to: 6.6 Requires PHP: 7.0 -Stable tag: 0.21.8 +Stable tag: 0.21.9 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html diff --git a/src/tainacan.php b/src/tainacan.php index 069afad32..acbde7645 100644 --- a/src/tainacan.php +++ b/src/tainacan.php @@ -5,17 +5,17 @@ Plugin URI: https://tainacan.org/ Description: Open source, powerful and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional repository platform. Author: Tainacan.org Author URI: https://tainacan.org/ -Version: 0.21.8 +Version: 0.21.9 Requires at least: 5.9 Tested up to: 6.6 Requires PHP: 7.0 -Stable tag: 0.21.8 +Stable tag: 0.21.9 Text Domain: tainacan License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html */ -const TAINACAN_VERSION = '0.21.8'; +const TAINACAN_VERSION = '0.21.9'; defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); $TAINACAN_BASE_URL = plugins_url('', __FILE__);