Plugin Directory

Changeset 3468114


Ignore:
Timestamp:
02/24/2026 12:25:05 AM (6 weeks ago)
Author:
intufind
Message:

Release intufind v1.2.2

Location:
intufind
Files:
34 added
3 edited

Legend:

Unmodified
Added
Removed
  • intufind/trunk/includes/class-intufind-search-override.php

    r3463876 r3468114  
    143143        }
    144144
     145        // Skip feed/RSS requests — they can trigger is_search() with query params.
     146        if ( $query->is_feed() || is_feed() ) {
     147            return;
     148        }
     149
    145150        $search_term = $query->get( 's' );
    146         if ( empty( $search_term ) ) {
     151        if ( empty( $search_term ) || ! $this->is_valid_search_term( $search_term ) ) {
    147152            return;
    148153        }
     
    180185
    181186        $search_term = $query->query_vars['s'];
     187
     188        if ( ! $this->is_valid_search_term( $search_term ) ) {
     189            return $query;
     190        }
    182191
    183192        // Try to get cached results.
     
    456465
    457466    /**
     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    /**
    458496     * Generate a cache key for search results.
    459497     *
  • intufind/trunk/intufind.php

    r3465448 r3468114  
    44 * Plugin URI: https://intufind.com/integrations/wordpress
    55 * 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.1
     6 * Version: 1.2.2
    77 * Requires at least: 6.0
    88 * Requires PHP: 8.0
     
    2626 * Plugin constants.
    2727 */
    28 define( 'INTUFIND_VERSION', '1.2.1' );
     28define( 'INTUFIND_VERSION', '1.2.2' );
    2929define( 'INTUFIND_PLUGIN_FILE', __FILE__ );
    3030define( 'INTUFIND_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • intufind/trunk/readme.txt

    r3465448 r3468114  
    55Tested up to: 6.9
    66Requires PHP: 8.0
    7 Stable tag: 1.2.1
     7Stable tag: 1.2.2
    88WC tested up to: 9.6
    99License: GPLv2 or later
     
    215215== Changelog ==
    216216
     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
    217221= 1.2.1 =
    218222* Fixed search shortcode not opening the modal when clicked before the widget finishes loading
     
    282286== Upgrade Notice ==
    283287
     288= 1.2.2 =
     289Filters out RSS feed paths, URLs, and bot-like patterns from native search logging to keep analytics clean.
     290
    284291= 1.2.1 =
    285292Fixes 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.