diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index b948d9fad6..ced798288e 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -445,7 +445,8 @@ function wp_edit_theme_plugin_file( $args ) { } } - if ( 0 !== validate_file( $real_file, $allowed_files ) ) { + // Compare based on relative paths + if ( 0 !== validate_file( $file, array_keys( $allowed_files ) ) ) { return new WP_Error( 'disallowed_theme_file', __( 'Sorry, that file cannot be edited.' ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index c919b9e5c6..b1a5c06c7a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.1-alpha-42243'; +$wp_version = '4.9.1-alpha-42245'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.