Plugin Directory

Changeset 3457877


Ignore:
Timestamp:
02/10/2026 10:33:35 AM (6 weeks ago)
Author:
wcproducttable
Message:

V4.6.3

Location:
wc-product-table-lite
Files:
671 added
3 edited

Legend:

Unmodified
Added
Removed
  • wc-product-table-lite/trunk/main.php

    r3416405 r3457877  
    66 * Author: WC Product Table
    77 * Author URI: https://profiles.wordpress.org/wcproducttable/
    8  * Version: 4.6.2
     8 * Version: 4.6.3
    99 *
    1010 * WC requires at least: 3.4.4
    11  * WC tested up to: 10.3.6
     11 * WC tested up to: 10.5.0
    1212 *
    1313 * Text Domain: wc-product-table-pro
     
    2222define('WCPT_DEV', false);
    2323
    24 define('WCPT_VERSION', '4.6.2');
     24define('WCPT_VERSION', '4.6.3');
    2525define('WCPT_PLUGIN_PATH', plugin_dir_path(__FILE__));
    2626define('WCPT_PLUGIN_URL', plugin_dir_url(__FILE__));
  • wc-product-table-lite/trunk/readme.txt

    r3416405 r3457877  
    33Tags: woocommerce product table, wc product table, product table for woocommerce, woocommerce product list, woocommerce tables
    44Requires at least: 4.9
    5 Tested up to: 6.9.0
     5Tested up to: 6.9.1
    66Requires PHP: 7.4
    77Stable tag: 4.6.2
     
    170170
    171171== Changelog ==
     172
     173= 4.6.3 (10th February '25) =
     174
     175Fixed
     176* Security vulnerability resolved
    172177
    173178= 4.6.2 (28th October '25) =
  • wc-product-table-lite/trunk/search.php

    r3394362 r3457877  
    547547  if ($permitted['phrase_like']) {
    548548    $esc_keyword_phrase = $wpdb->esc_like($keyword_phrase);
    549     $post_ids = apply_filters('wcpt_search__query_results', $wpdb->get_col($query . " LIKE '%$esc_keyword_phrase%'"));
     549    $post_ids = apply_filters(
     550      'wcpt_search__query_results',
     551      $wpdb->get_col(
     552        $wpdb->prepare(
     553          $query . " LIKE %s",
     554          '%' . $esc_keyword_phrase . '%'
     555        )
     556      )
     557    );
    550558    $location['phrase_like'] = $post_ids;
    551559
     
    568576      $fixed_conditions = implode('AND', array_slice($conditions_parts, 0, -1));
    569577
    570       // Build the query
    571       $exact_query = $base_query .
    572         "WHERE " . $fixed_conditions .
    573         "AND (
    574                 " . end($conditions_parts) . " = '$esc_keyword'
    575                 OR " . end($conditions_parts) . " LIKE '% $esc_keyword %'
    576                 OR " . end($conditions_parts) . " LIKE '$esc_keyword %'
    577                 OR " . end($conditions_parts) . " LIKE '% $esc_keyword'
    578             )";
     578      // Build the query using prepare() for safety
     579      $exact_query = $wpdb->prepare(
     580        $base_query . "WHERE " . $fixed_conditions .
     581        "AND (" . end($conditions_parts) . " = %s
     582              OR " . end($conditions_parts) . " LIKE %s
     583              OR " . end($conditions_parts) . " LIKE %s
     584              OR " . end($conditions_parts) . " LIKE %s)",
     585        $esc_keyword,
     586        '% ' . $esc_keyword . ' %',
     587        $esc_keyword . ' %',
     588        '% ' . $esc_keyword
     589      );
    579590
    580591      $post_ids = apply_filters('wcpt_search__query_results', $wpdb->get_col($exact_query));
     
    593604      $fixed_conditions = implode('AND', array_slice($conditions_parts, 0, -1));
    594605
    595       // Build the query with LIKE
    596       $like_query = $base_query .
     606      // Build the query with LIKE using prepare()
     607      $like_query = $wpdb->prepare(
     608        $base_query .
    597609        "WHERE " . $fixed_conditions .
    598         "AND " . end($conditions_parts) . " LIKE '%$esc_keyword%'";
     610        "AND " . end($conditions_parts) . " LIKE %s",
     611        '%' . $esc_keyword . '%'
     612      );
    599613
    600614      $post_ids = apply_filters('wcpt_search__query_results', $wpdb->get_col($like_query));
Note: See TracChangeset for help on using the changeset viewer.