Plugin Directory

Changeset 3770792


Ignore:
Timestamp:
10/28/2026 01:45:55 PM (4 weeks ago)
Author:
baseapp
Message:

Minor update to address cve-2026-39767

Location:
wpbase-cache/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wpbase-cache/trunk/includes/object-cache.php

    r2694612 r3770792  
    11<?php
    22/**
    3  * Plugin Name: Redis Object Cache Drop-In
     3 * Drop In Name: Redis Object Cache Drop-In
    44 * Plugin URI: http://wordpress.org/plugins/redis-cache/
    55 * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Credis, HHVM, replication, clustering and WP-CLI.
    … …  
    1717// phpcs:disable Generic.WhiteSpace.ScopeIndent.IncorrectExact, Generic.WhiteSpace.ScopeIndent.Incorrect
    1818if ( ! defined( 'WP_REDIS_DISABLED' ) || ! WP_REDIS_DISABLED ) :
     19
    1920define('WP_CACHE_KEY_SALT', DB_NAME);   
    20 
    2121
    2222/**
  • wpbase-cache/trunk/readme.txt

    r3227421 r3770792  
    33Tags: cache,chaching,speed,performance,db cache,optimization,nginx,varnish
    44Requires at least: 3.5
    5 Tested up to: 6.7
     5Tested up to: 7.1
    66Stable tag: trunk
    77Donate link:
  • wpbase-cache/trunk/wpbase-cache.php

    r3227421 r3770792  
    44  Plugin URI: https://www.wpoven.com/
    55  Description: Custom WordPress Caching plugin for WPOven Hosted Sites which uses all caches on varnish, nginx, php-fpm stack and Redis.
    6   Version: 5.5.6
     6  Version: 5.5.7
    77  Author: Vikrant Datta
    88  Author URI: https://www.wpoven.com/
    … …  
    5151
    5252    if (!isset($check_cache)) {
    53         $content = wp_remote_get("https://wpoven.com/sites/check/wpbasecachecheck/" . $sitename);
     53        $content = wp_remote_get("https://app.wpoven.com/sites/check/wpbasecachecheck/" . $sitename);
    5454        $content = (int) $content;
    5555        update_option('wpbase_check_site', $content);
    … …  
    7575            $req_cache = json_decode($req_cache, true);
    7676            if (!get_option('wpbase_req_cache_new')) {
    77                 $content = wp_remote_get("https://wpoven.com/sites/checksiteinfo/" . $sitename);
     77                $content = wp_remote_get("https://app.wpoven.com/sites/checksiteinfo/" . $sitename);
    7878                $return_array = json_decode($content['body'], true);
    7979                update_option('wpbase_req_cache_new', $content['body']);
    … …  
    9696                    'id' => 'WPOven-button',
    9797                    'title' => 'WPOven Site Dashboard',
    98                     'href' => 'https://wpoven.com/sites/edit/' . $sitename,
     98                    'href' => 'https://app.wpoven.com/sites/edit/' . $sitename,
    9999                    'meta' => array(
    100100                        'class' => 'dashboard-button-class'
  • wpbase-cache/trunk/wpbase-redis-cache.php

    r2694612 r3770792  
    251251        }
    252252
    253 
    254 
    255         public function do_admin_actions() {
    256                 if(strpos($_SERVER["HTTP_REFERER"], "options-general.php?page=wpbasecache") !== false){
    257                         global $wp_filesystem;
    258                         if ( $this->initialize_filesystem( $url, true ) ) {
    259                                 if ($_POST['wpbase_cache_options']['redis_cache'] == '1') {
    260                                         update_option('wpbase_cache_options', 'redis_cache', "1");
    261                                         $wp_filesystem->copy(plugin_dir_path(__FILE__) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true);
    262                                         do_action( 'redis_object_cache_enable', $result );
    263                                 } else if ($_POST['wpbase_cache_options']['redis_cache'] == NULL || $_POST['wpbase_cache_options']['redis_cache'] == '0') {
    264                                         update_option('wpbase_cache_options', 'redis_cache', '0');
    265                                         $wp_filesystem->delete(WP_CONTENT_DIR . '/object-cache.php');
    266                                         do_action( 'redis_object_cache_disable', $result );
    267                                 }
    268                         }
    269                 }
     253        public function do_admin_actions() {
     254                if ( ! is_admin() || ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) {
     255                        return;
     256                }
     257
     258                if ( empty( $_POST['wpbase_cache_options']['redis_cache'] ) && ! array_key_exists( 'redis_cache', (array) $_POST['wpbase_cache_options'] ) ) {
     259                        return;
     260                }
     261
     262                if ( ! empty( $_SERVER['HTTP_REFERER'] ) && false !== strpos( wp_unslash( $_SERVER['HTTP_REFERER'] ), 'options-general.php?page=wpbasecache' ) ) {
     263                        global $wp_filesystem;
     264                        $options = get_option( 'wpbase_cache_options', array() );
     265                        $redis_cache = sanitize_text_field( wp_unslash( $_POST['wpbase_cache_options']['redis_cache'] ) );                     
     266
     267                        if ( $redis_cache === '1' ) {
     268                                $options['redis_cache'] = 1;
     269                                if ( $this->initialize_filesystem( admin_url( 'options-general.php?page=wpbasecache' ), true ) ) {
     270                                        $wp_filesystem->copy( plugin_dir_path( __FILE__ ) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true );
     271                                        do_action( 'redis_object_cache_enable', $result );
     272                                }
     273                        } else {
     274                                $options['redis_cache'] = 0;
     275                                if ( $this->initialize_filesystem( admin_url( 'options-general.php?page=wpbasecache' ), true ) ) {
     276                                        $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' );
     277                                        do_action( 'redis_object_cache_disable', $result );
     278                                }
     279                        }
     280                        update_option( 'wpbase_cache_options', $options );
     281                }
    270282        }
    271283
Note: See TracChangeset for help on using the changeset viewer.