From 3ce72ee99bc230c3df10841a69d0ff243eb1a0bb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 1 Jul 2024 20:08:41 +0200 Subject: Adding upstream version 6.5.5+dfsg1. Signed-off-by: Daniel Baumann --- wp-includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wp-includes/functions.php') diff --git a/wp-includes/functions.php b/wp-includes/functions.php index fd305be..f9d6176 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -6192,6 +6192,9 @@ function validate_file( $file, $allowed_files = array() ) { return 0; } + // Normalize path for Windows servers + $file = wp_normalize_path( $file ); + // `../` on its own is not allowed: if ( '../' === $file ) { return 1; -- cgit v1.2.3