Changeset 3468114
- Timestamp:
- 02/24/2026 12:25:05 AM (6 weeks ago)
- Location:
- intufind
- Files:
-
- 34 added
- 3 edited
-
tags/1.2.2 (added)
-
tags/1.2.2/admin (added)
-
tags/1.2.2/admin/class-intufind-admin.php (added)
-
tags/1.2.2/admin/class-intufind-components.php (added)
-
tags/1.2.2/admin/css (added)
-
tags/1.2.2/admin/css/intufind-admin.css (added)
-
tags/1.2.2/admin/js (added)
-
tags/1.2.2/admin/js/intufind-admin.js (added)
-
tags/1.2.2/admin/partials (added)
-
tags/1.2.2/admin/partials/chat-display.php (added)
-
tags/1.2.2/admin/partials/recommendations-display.php (added)
-
tags/1.2.2/admin/partials/search-display.php (added)
-
tags/1.2.2/admin/partials/settings-display.php (added)
-
tags/1.2.2/admin/partials/status-display.php (added)
-
tags/1.2.2/admin/partials/sync-display.php (added)
-
tags/1.2.2/includes (added)
-
tags/1.2.2/includes/class-intufind-api.php (added)
-
tags/1.2.2/includes/class-intufind-chat-widget.php (added)
-
tags/1.2.2/includes/class-intufind-content-extractor.php (added)
-
tags/1.2.2/includes/class-intufind-exclusions.php (added)
-
tags/1.2.2/includes/class-intufind-list-columns.php (added)
-
tags/1.2.2/includes/class-intufind-mcp.php (added)
-
tags/1.2.2/includes/class-intufind-plugin.php (added)
-
tags/1.2.2/includes/class-intufind-recommendations-override.php (added)
-
tags/1.2.2/includes/class-intufind-search-override.php (added)
-
tags/1.2.2/includes/class-intufind-search-widget.php (added)
-
tags/1.2.2/includes/class-intufind-shortcodes.php (added)
-
tags/1.2.2/includes/class-intufind-sync-status.php (added)
-
tags/1.2.2/includes/class-intufind-sync.php (added)
-
tags/1.2.2/intufind.php (added)
-
tags/1.2.2/languages (added)
-
tags/1.2.2/languages/intufind.pot (added)
-
tags/1.2.2/readme.txt (added)
-
tags/1.2.2/uninstall.php (added)
-
trunk/includes/class-intufind-search-override.php (modified) (3 diffs)
-
trunk/intufind.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
intufind/trunk/includes/class-intufind-search-override.php
r3463876 r3468114 143 143 } 144 144 145 // Skip feed/RSS requests — they can trigger is_search() with query params. 146 if ( $query->is_feed() || is_feed() ) { 147 return; 148 } 149 145 150 $search_term = $query->get( 's' ); 146 if ( empty( $search_term ) ) {151 if ( empty( $search_term ) || ! $this->is_valid_search_term( $search_term ) ) { 147 152 return; 148 153 } … … 180 185 181 186 $search_term = $query->query_vars['s']; 187 188 if ( ! $this->is_valid_search_term( $search_term ) ) { 189 return $query; 190 } 182 191 183 192 // Try to get cached results. … … 456 465 457 466 /** 467 * Check if a search term looks like a real user query. 468 * 469 * Filters out feed paths, URLs, and bot-like patterns that WordPress 470 * can misroute through the search handler. 471 * 472 * @param string $search_term The search term to validate. 473 * @return bool True if it looks like a real search query. 474 */ 475 private function is_valid_search_term( $search_term ) { 476 $term = trim( $search_term ); 477 478 if ( strlen( $term ) < 2 ) { 479 return false; 480 } 481 482 // Feed/RSS paths that WordPress can route through search. 483 if ( preg_match( '#^/|^https?:|^feed\b|/feed\b|^rss\b|/rss\b|/sitemap#i', $term ) ) { 484 return false; 485 } 486 487 // Looks like a URL path segment (e.g. "page/2/19175"). 488 if ( preg_match( '#^[\w-]+/\d+#', $term ) ) { 489 return false; 490 } 491 492 return true; 493 } 494 495 /** 458 496 * Generate a cache key for search results. 459 497 * -
intufind/trunk/intufind.php
r3465448 r3468114 4 4 * Plugin URI: https://intufind.com/integrations/wordpress 5 5 * Description: AI-powered search and chat for WordPress. Syncs your content to the cloud for semantic search, intelligent recommendations, and conversational AI. 6 * Version: 1.2. 16 * Version: 1.2.2 7 7 * Requires at least: 6.0 8 8 * Requires PHP: 8.0 … … 26 26 * Plugin constants. 27 27 */ 28 define( 'INTUFIND_VERSION', '1.2. 1' );28 define( 'INTUFIND_VERSION', '1.2.2' ); 29 29 define( 'INTUFIND_PLUGIN_FILE', __FILE__ ); 30 30 define( 'INTUFIND_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
intufind/trunk/readme.txt
r3465448 r3468114 5 5 Tested up to: 6.9 6 6 Requires PHP: 8.0 7 Stable tag: 1.2. 17 Stable tag: 1.2.2 8 8 WC tested up to: 9.6 9 9 License: GPLv2 or later … … 215 215 == Changelog == 216 216 217 = 1.2.2 = 218 * Fixed RSS feed requests and bot-like URL patterns being logged as native search queries 219 * Added search term validation to filter out junk entries before they reach analytics 220 217 221 = 1.2.1 = 218 222 * Fixed search shortcode not opening the modal when clicked before the widget finishes loading … … 282 286 == Upgrade Notice == 283 287 288 = 1.2.2 = 289 Filters out RSS feed paths, URLs, and bot-like patterns from native search logging to keep analytics clean. 290 284 291 = 1.2.1 = 285 292 Fixes search shortcode failing to open when clicked before the widget loads. Adds fallback to native search if the widget is unreachable.
Note: See TracChangeset
for help on using the changeset viewer.