mirror of
git://develop.git.wordpress.org/
synced 2025-03-15 01:19:51 +01:00
Editor: Fix Path Traversal issue on Windows in Template-Part Block.
Props xknown. git-svn-id: https://develop.svn.wordpress.org/trunk@58470 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9c022260d6
commit
8ee7211a7a
@ -6199,6 +6199,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user