Plugin Directory

Changeset 2869601


Ignore:
Timestamp:
02/22/2023 07:23:26 PM (3 years ago)
Author:
LiteSpeedTech
Message:

Release v5.3.3

Location:
litespeed-cache
Files:
330 added
16 edited

Legend:

Unmodified
Added
Removed
  • litespeed-cache/trunk/data/js_defer_excludes.txt

    r2524344 r2869601  
    66# JS file URL excludes
    77
     8stats.wp.com/e-
     9_stq
     10## JetPack Stats
  • litespeed-cache/trunk/data/js_excludes.txt

    r2683957 r2869601  
    2525
    2626wp-json/wp-statistics ## WP Statistics
     27
     28stats.wp.com/e-
     29_stq
     30## JetPack Stats
  • litespeed-cache/trunk/lib/css-min/minifier.cls.php

    r2292926 r2869601  
    321321
    322322        // Process strings so their content doesn't get accidentally minified
     323        $double_quoted = '"(?:[^"\\\\]|\\\\.)*"';
     324        $single_quoted = "'(?:[^'\\\\]|\\\\.)*'";
    323325        $css = preg_replace_callback(
    324             '/(?:"(?:[^\\\\"]|\\\\.|\\\\)*")|'."(?:'(?:[^\\\\']|\\\\.|\\\\)*')/S",
     326            "/(?<!\\\\)(?:$double_quoted|$single_quoted)/S",
    325327            array($this, 'processStringsCallback'),
    326328            $css
  • litespeed-cache/trunk/litespeed-cache.php

    r2846360 r2869601  
    44 * Plugin URI:        https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
    55 * Description:       High-performance page caching and site optimization from LiteSpeed
    6  * Version:           5.3.2
     6 * Version:           5.3.3
    77 * Author:            LiteSpeed Technologies
    88 * Author URI:        https://www.litespeedtech.com
     
    3434}
    3535
    36 ! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '5.3.2' );
     36! defined('LSCWP_V') && define('LSCWP_V', '5.3.3');
    3737
    3838! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
  • litespeed-cache/trunk/readme.txt

    r2846360 r2869601  
    44Requires at least: 4.0
    55Tested up to: 6.1.1
    6 Stable tag: 5.3.2
     6Stable tag: 5.3.3
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl.html
     
    250250
    251251== Changelog ==
     252
     253= 5.3.3 - Feb 22 2023 =
     254* **Page Optimize** Excluded Jetpack stats JS.
     255* **DB Optimize** Fixed DB Optm SQL for revision postmeta.
     256* **Cache** Fixed an undefined array key warning.
     257* **Purge** Prevented undefined array key warning when widgets are disabled.
     258* **Object** Fixed dynamic property deprecation warnings.
     259* **Admin** Safely redirect to homepage if referer is unknown.
     260* **Activation** Check that item slug exists first.
     261* **Cache** Prevented cache header to send globally if header part already closed.
     262* **CSS** Improved string handling for CSS minifier.
     263* **Debug** Fixed undefined array key warnings.
     264* **Misc** Fixed implicit conversion in random string generation function `Str::rrand`.
    252265
    253266= 5.3.2 - Jan 10 2023 =
  • litespeed-cache/trunk/src/activation.cls.php

    r2761310 r2869601  
    456456     */
    457457    public function auto_update_hook( $update, $item ) {
    458         if ( $item->slug == 'litespeed-cache' ) {
     458        if ( ! empty( $item->slug ) && 'litespeed-cache' === $item->slug ) {
    459459            $auto_v = Cloud::version_check( 'auto_update_plugin' );
    460460
  • litespeed-cache/trunk/src/admin.cls.php

    r2808204 r2869601  
    141141     * without the nonce and action in the query string.
    142142     *
     143     * If the redirect url cannot be determined, redirects to the homepage.
     144     *
    143145     * @since 1.0.12
    144146     * @access public
     
    149151
    150152        if ( ! empty( $_GET[ '_litespeed_ori' ] ) ) {
    151             wp_redirect( $_SERVER[ 'HTTP_REFERER' ] );
     153            wp_safe_redirect( wp_get_referer() ?: get_home_url() );
    152154            exit;
    153155        }
  • litespeed-cache/trunk/src/control.cls.php

    r2846360 r2869601  
    742742        }
    743743
    744         if ( $_SERVER[ 'REQUEST_METHOD' ] !== 'GET' ) {
    745             return $this->_no_cache_for('not GET method:' . $_SERVER["REQUEST_METHOD"]);
     744        $method = isset( $_SERVER['REQUEST_METHOD'] ) ? $_SERVER['REQUEST_METHOD'] : 'unknown';
     745        if ( 'GET' !== $method ) {
     746            return $this->_no_cache_for('Not GET method: ' . $method);
    746747        }
    747748
  • litespeed-cache/trunk/src/core.cls.php

    r2832517 r2869601  
    526526        }
    527527        else {
     528            return;
     529        }
     530
     531        // Avoid PHP warning for header sent out already
     532        if (headers_sent()) {
     533            self::debug('❌ !!! Err: Header sent out already');
    528534            return;
    529535        }
  • litespeed-cache/trunk/src/db-optm.cls.php

    r2846360 r2869601  
    134134                $rev_age = (int) $this->conf( Base::O_DB_OPTM_REVISIONS_AGE );
    135135
     136                $postmeta = "`$wpdb->postmeta`";
     137                $posts = "`$wpdb->posts`";
     138
    136139                $sql_postmeta = "
    137                     `$wpdb->postmeta`
    138                     LEFT JOIN `$wpdb->posts`
    139                     ON `$wpdb->posts`.ID = `$wpdb->postmeta`.post_id
     140                    $postmeta
     141                    LEFT JOIN $posts
     142                    ON $posts.ID = $postmeta.post_id
    140143                ";
    141144
    142                 $sql_where = "WHERE `$wpdb->posts`.post_type = 'revision'";
    143 
    144                 $sql_add =
    145                     $rev_age
    146                     ? "AND `$wpdb->posts`.post_modified < DATE_SUB( NOW(), INTERVAL $rev_age DAY )"
     145                $sql_where = "WHERE $posts.post_type = 'revision'";
     146
     147                $sql_add = $rev_age
     148                    ? "AND $posts.post_modified < DATE_SUB( NOW(), INTERVAL $rev_age DAY )"
    147149                    : '';
    148150
    149151                if ( ! $rev_max ) {
    150152                    $sql_where = "$sql_where $sql_add";
    151                     $wpdb->query( "DELETE FROM $sql_postmeta $sql_where" );
    152                     $wpdb->query( "DELETE FROM `$wpdb->posts` $sql_where" );
    153                 }
    154                 else { // Has count limit
     153                    $wpdb->query( "DELETE $postmeta FROM $sql_postmeta $sql_where" );
     154                    $wpdb->query( "DELETE FROM $posts $sql_where" );
     155                } else {
     156                    // Has count limit
    155157                    $sql = "
    156158                        SELECT COUNT(*) - $rev_max
    157159                        AS del_max, post_parent
    158                         FROM `$wpdb->posts`
     160                        FROM $posts
    159161                        WHERE post_type = 'revision'
    160162                        $sql_add
     
    165167                    $sql_where = "
    166168                        $sql_where
    167                         AND `$wpdb->posts`.post_parent = %d
    168                         ORDER BY `$wpdb->posts`.ID
     169                        AND $posts.post_parent = %d
     170                        ORDER BY $posts.ID
    169171                        LIMIT %d
    170172                    ";
    171173                    foreach ( $res as $v ) {
    172                         $sql = "DELETE FROM $sql_postmeta $sql_where";
    173                         $wpdb->query( $wpdb->prepare( $sql, array( $v->post_parent, $v->del_max ) ) );
    174                         $sql = "DELETE FROM `$wpdb->posts` $sql_where";
    175                         $wpdb->query( $wpdb->prepare( $sql, array( $v->post_parent, $v->del_max ) ) );
     174                        $args = array( $v->post_parent, $v->del_max );
     175                        $sql = $wpdb->prepare( "DELETE $postmeta FROM $sql_postmeta $sql_where", $args );
     176                        $wpdb->query( $sql );
     177                        $sql = $wpdb->prepare( "DELETE FROM $posts $sql_where", $args );
     178                        $wpdb->query( $sql );
    176179                    }
    177180                }
  • litespeed-cache/trunk/src/debug2.cls.php

    r2808204 r2869601  
    220220            'HTTP_ACCEPT_ENCODING' => '',
    221221            'HTTP_COOKIE' => '',
     222            'REQUEST_METHOD' => '',
     223            'SERVER_PROTOCOL' => '',
    222224            'X-LSCACHE' => '',
    223225            'LSCACHE_VARY_COOKIE' => '',
     
    308310            }
    309311            else {
    310                 $addr = $_SERVER[ 'REMOTE_ADDR' ] . ':' . $_SERVER[ 'REMOTE_PORT' ];
     312                $addr = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : '';
     313                $port = isset( $_SERVER['REMOTE_PORT'] ) ? $_SERVER['REMOTE_PORT'] : '';
     314                $addr = "$addr:$port";
    311315            }
    312316
  • litespeed-cache/trunk/src/object-cache.cls.php

    r2613854 r2869601  
    3333    private $_cfg_host;
    3434    private $_cfg_port;
     35    private $_cfg_life;
    3536    private $_cfg_persistent;
    3637    private $_cfg_admin;
  • litespeed-cache/trunk/src/placeholder.cls.php

    r2761310 r2869601  
    2424    private $_conf_placeholder_resp_color;
    2525    private $_conf_placeholder_resp_async;
     26    private $_conf_ph_default;
    2627    private $_placeholder_resp_dict = array();
    2728    private $_ph_queue = array();
  • litespeed-cache/trunk/src/purge.cls.php

    r2832517 r2869601  
    11451145        global $wp_widget_factory;
    11461146        // recent_posts
    1147         if ( ! is_null( $wp_widget_factory->widgets['WP_Widget_Recent_Posts'] ) ) {
    1148             $purge_tags[] = Tag::TYPE_WIDGET . $wp_widget_factory->widgets['WP_Widget_Recent_Posts']->id;
     1147        $recent_posts = isset( $wp_widget_factory->widgets['WP_Widget_Recent_Posts'] )
     1148            ? $wp_widget_factory->widgets['WP_Widget_Recent_Posts']
     1149            : null;
     1150        if ( ! is_null( $recent_posts ) ) {
     1151            $purge_tags[] = Tag::TYPE_WIDGET . $recent_posts->id;
    11491152        }
    11501153
  • litespeed-cache/trunk/src/str.cls.php

    r2354196 r2869601  
    2121     */
    2222    public static function rrand( $len, $type = 7 ) {
    23         mt_srand( ( double ) microtime() * 1000000 );
     23        mt_srand( (int) ( ( double ) microtime() * 1000000 ) );
    2424
    2525        switch( $type ) {
  • litespeed-cache/trunk/tpl/presets/standard.tpl.php

    r2808204 r2869601  
    4646    ),
    4747    'footer' => array(
    48         __( 'This preset is good for most websites, and is unlikely to cause conflicts. Any CSS or JS conflicts may be resolved with Page Optimization > Tuning tools.' ),
     48        __( 'This preset is good for most websites, and is unlikely to cause conflicts. Any CSS or JS conflicts may be resolved with Page Optimization > Tuning tools.', 'litespeed-cache' ),
    4949        __( 'A Domain Key is required to use this preset. Includes many optimizations known to improve page speed scores.', 'litespeed-cache' )
    5050    )
     
    6161    ),
    6262    'footer' => array(
    63         __( 'This preset might work out of the box for some websites, but be sure to test! Some CSS or JS exclusions may be necessary in Page Optimization > Tuning.' ),
     63        __( 'This preset might work out of the box for some websites, but be sure to test! Some CSS or JS exclusions may be necessary in Page Optimization > Tuning.', 'litespeed-cache' ),
    6464        __( 'A Domain Key is required to use this preset. Includes many optimizations known to improve page speed scores.', 'litespeed-cache' )
    6565    )
     
    7777    ),
    7878    'footer' => array(
    79         __( 'This preset almost certainly will require testing and exclusions for some CSS, JS and Lazy Loaded images. Pay special attention to logos, or HTML-based slider images.' ),
     79        __( 'This preset almost certainly will require testing and exclusions for some CSS, JS and Lazy Loaded images. Pay special attention to logos, or HTML-based slider images.', 'litespeed-cache' ),
    8080        __( 'A Domain Key is required to use this preset. Enables the maximum level of optimizations for improved page speed scores.', 'litespeed-cache' )
    8181    )
Note: See TracChangeset for help on using the changeset viewer.