Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/yith-woocommerce-ajax-search/assets/js/admin/build/indexing.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/admin/build/indexing.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array(), 'version' => 'ae105292dd3593af0639');
+<?php return array('dependencies' => array(), 'version' => '737841860c98389cbe49');
--- a/yith-woocommerce-ajax-search/assets/js/admin/build/panel.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/admin/build/panel.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array(), 'version' => 'bb39ccb0114d250d04d6');
+<?php return array('dependencies' => array(), 'version' => 'de42f46b0f426ab9b621');
--- a/yith-woocommerce-ajax-search/assets/js/admin/build/search-fields.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/admin/build/search-fields.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array(), 'version' => '702293d790a5ac6cbdb2');
+<?php return array('dependencies' => array(), 'version' => '6603974ebd0afb575abe');
--- a/yith-woocommerce-ajax-search/assets/js/admin/build/shortcodes.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/admin/build/shortcodes.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array(), 'version' => 'fb6aa5abb3adc9dc00cc');
+<?php return array('dependencies' => array(), 'version' => 'c16e7ef385e48f6862e3');
--- a/yith-woocommerce-ajax-search/assets/js/admin/build/statistic.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/admin/build/statistic.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array(), 'version' => '19e03ed9514a8e30bb12');
+<?php return array('dependencies' => array(), 'version' => 'd843399ee47024f7ce0b');
--- a/yith-woocommerce-ajax-search/assets/js/admin/build/upgrade-modal.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/admin/build/upgrade-modal.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array(), 'version' => 'dceb9d5da525a28ab8fe');
+<?php return array('dependencies' => array(), 'version' => '1989f8876979439fbbfb');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/search-block-frontend.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/search-block-frontend.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lapilli-ui-components', 'lapilli-ui-styles', 'react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'ywcas-block-settings', 'ywcas-blocks-data-store', 'ywcas-blocks-registry'), 'version' => '976f0f494e57101252e5');
+<?php return array('dependencies' => array('lapilli-ui-components', 'lapilli-ui-styles', 'react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'ywcas-block-settings', 'ywcas-blocks-data-store', 'ywcas-blocks-registry'), 'version' => '0eb0e309c9afc408c4c4');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/search-block-style.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/search-block-style.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lapilli-ui-components', 'lapilli-ui-styles', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'ywcas-block-settings', 'ywcas-blocks-data-store', 'ywcas-blocks-registry'), 'version' => '578ed2e87b58d4f81a4c');
+<?php return array('dependencies' => array('lapilli-ui-components', 'lapilli-ui-styles', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'ywcas-block-settings', 'ywcas-blocks-data-store', 'ywcas-blocks-registry'), 'version' => 'e70b5961f510540a91d5');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/search-block.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/search-block.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lapilli-ui-components', 'lapilli-ui-styles', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'ywcas-block-settings', 'ywcas-blocks-data-store'), 'version' => '0883f430df60e8d2cd48');
+<?php return array('dependencies' => array('lapilli-ui-components', 'lapilli-ui-styles', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'ywcas-block-settings', 'ywcas-blocks-data-store'), 'version' => 'f88fa52d0187b81119d5');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks-data.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks-data.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-polyfill', 'ywcas-block-settings'), 'version' => '9b47e0401b0aa99e5e48');
+<?php return array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-polyfill', 'ywcas-block-settings'), 'version' => '2671156d40919bf57f17');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks-editor-style-style.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks-editor-style-style.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'e5b4c9d96b74fefcaaf7');
+<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'b65219b0591129c805ab');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks-registry.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks-registry.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'a6150a34a5538638d838');
+<?php return array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'd1abe57f0352bfd9ee68');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks-vendors.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks-vendors.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('wp-polyfill'), 'version' => '43a38f8553866a7d60cd');
+<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'df5aa37f34d4268d1a09');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-blocks.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'wp-blocks', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill'), 'version' => '7c62d24eb4fc30f5efe3');
+<?php return array('dependencies' => array('react', 'wp-blocks', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill'), 'version' => 'c0214f9ab3df326e0319');
--- a/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-settings.asset.php
+++ b/yith-woocommerce-ajax-search/assets/js/blocks/build/ywcas-settings.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('wp-polyfill'), 'version' => '0a341b3401a98886042d');
+<?php return array('dependencies' => array('wp-polyfill'), 'version' => '562a482b9135b145c3d7');
--- a/yith-woocommerce-ajax-search/includes/data-search/class-yith-wcas-data-search-engine.php
+++ b/yith-woocommerce-ajax-search/includes/data-search/class-yith-wcas-data-search-engine.php
@@ -205,6 +205,20 @@
}
$ids = array_column( $search_results, 'post_id' );
+
+ /**
+ * APPLY_FILTERS: ywcas_ids_fetch_limit
+ *
+ * Apply a limit to the number of IDs fetched from the index.
+ *
+ * @param int The maximum number of IDs to process. Default 0 (no limit).
+ */
+ $limit = apply_filters( 'ywcas_ids_fetch_limit', 0 );
+
+ if ( $limit > 0 && count( $ids ) > $limit ) {
+ $ids = array_slice( $ids, 0, $limit );
+ }
+
$results = YITH_WCAS_Data_Index_Lookup::get_instance()->get_data_by_id( $ids, $post_type, $category );
$results = $this->add_score( $results, $search_results );
--- a/yith-woocommerce-ajax-search/init.php
+++ b/yith-woocommerce-ajax-search/init.php
@@ -3,7 +3,7 @@
* Plugin Name: YITH WooCommerce Ajax Search
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
* Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
- * Version: 2.30.0
+ * Version: 2.30.1
* Author: YITH
* Author URI: https://yithemes.com/
* Text Domain: yith-woocommerce-ajax-search
@@ -71,7 +71,7 @@
register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
-! defined( 'YITH_WCAS_VERSION' ) && define( 'YITH_WCAS_VERSION', '2.30.0' );
+! defined( 'YITH_WCAS_VERSION' ) && define( 'YITH_WCAS_VERSION', '2.30.1' );
! defined( 'YITH_WCAS_FREE_INIT' ) && define( 'YITH_WCAS_FREE_INIT', plugin_basename( __FILE__ ) );
! defined( 'YITH_WCAS' ) && define( 'YITH_WCAS', true );
! defined( 'YITH_WCAS_FILE' ) && define( 'YITH_WCAS_FILE', __FILE__ );