Plugin Directory


Ignore:
Timestamp:
11/02/2026 02:48:14 PM (3 weeks ago)
Author:
emrevona
Message:
  • Added path validation to singleDeleteCache() and delete_next_prev_cache() to prevent directory traversal through percent-encoded URLs before cache paths are deleted
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-fastest-cache/trunk/wpFastestCache.php

    r3779495 r3780060  
    16311631
    16321632                                if(preg_match("/https?:\/\/[^\/]+\/(.+)/", $permalink, $out)){
     1633                                        if(preg_match("/\.{2,}/", $out[1])){
     1634                                                // to prevent Directory Traversal Attack
     1635                                                return;
     1636                                        }
     1637
    16331638                                        $path = $this->getWpContentDir("/cache/all/").$out[1];
    16341639                                        $mobile_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/").$out[1];
    … …  
    17221727
    17231728                                        if(preg_match("/https?:\/\/[^\/]+\/(.+)/", $permalink, $out)){
     1729                                                if(preg_match("/\.{2,}/", $out[1])){
     1730                                                        // to prevent Directory Traversal Attack
     1731                                                        continue;
     1732                                                }
     1733
    17241734                                                $path = $this->getWpContentDir("/cache/all/").$out[1];
    17251735                                                $mobile_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/").$out[1];
Note: See TracChangeset for help on using the changeset viewer.