Open
Description
To Reproduce
- Install wordpress in a path containing a char that is part of the regular expression syntax. Example: install at
/releases/2024-09-02T11:32:23+0000/
so the cache folder will be at/releases/2024-09-02T11:32:23+0000/wp-content/cache/wp-rocket/
- Purge the cache via the admin bar ( or other method)
- The cache is not purged
Why it happens
the function rocket_clean_files
uses the function _rocket_get_cache_dirs
at
wp-rocket/inc/functions/files.php
Line 595 in de60b47
_rocket_get_cache_dirs
searches the folders by regex:
wp-rocket/inc/functions/files.php
Lines 1423 to 1438 in de60b47
But
_rocket_normalize_path( $cache_path, true )
only escapes the slash but not other characters.
It should be replaced by preg_quote( $cache_path, '/' )
Metadata
Metadata
Assignees
Labels
No labels