Glad to hear it, @castorand !
Probably only in a windows environment on localhost or windows server. My website on linux on the same wordpress version is not affected.
-
This reply was modified 1 year, 11 months ago by john1971hun.
Someone put this in \wp-includes\functions.php : function validate_file( … ):
// Normalize path for Windows servers
$file = wp_normalize_path( $file );
That changes the \ sign in $file to / sign, and so it doesn’t pass the $allowed_files check.
For example:
$file original = C:\wamp64\www\wordpress/wp-content/themes/astra-child/style.css
$file after wp_normalize_path -> C:/wamp64/www/wordpress/wp-content/themes/astra-child/style.css
$allowed_files = [style.css] => C:\wamp64\www\wordpress/wp-content/themes/astra-child/style.css
Quick solution: comment out the normalize in this function.
-
This reply was modified 1 year, 11 months ago by john1971hun.
-
This reply was modified 1 year, 11 months ago by john1971hun.