Editor: Fix Path Traversal issue on Windows in Template-Part Block.
Props xknown. Built from https://develop.svn.wordpress.org/trunk@58470 git-svn-id: http://core.svn.wordpress.org/trunk@57919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5e554da546
commit
abc2db829a
|
@ -6199,6 +6199,9 @@ function validate_file( $file, $allowed_files = array() ) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Normalize path for Windows servers
|
||||||
|
$file = wp_normalize_path( $file );
|
||||||
|
|
||||||
// `../` on its own is not allowed:
|
// `../` on its own is not allowed:
|
||||||
if ( '../' === $file ) {
|
if ( '../' === $file ) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-beta3-58469';
|
$wp_version = '6.6-beta3-58470';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue