Filesystem API: Prevent directory travelersals when creating new folders.
Reject file paths that contain sub-directory paths. Props iandunn, xknown, sstoqnov, whyisjake. Built from https://develop.svn.wordpress.org/branches/5.2@46484 git-svn-id: http://core.svn.wordpress.org/branches/5.2@46282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e5e18e9b15
commit
cbc773dcbb
|
@ -587,6 +587,10 @@ function rest_send_cors_headers( $value ) {
|
||||||
header( 'Access-Control-Allow-Origin: ' . $origin );
|
header( 'Access-Control-Allow-Origin: ' . $origin );
|
||||||
header( 'Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, PATCH, DELETE' );
|
header( 'Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, PATCH, DELETE' );
|
||||||
header( 'Access-Control-Allow-Credentials: true' );
|
header( 'Access-Control-Allow-Credentials: true' );
|
||||||
|
header( 'Vary: Origin', false );
|
||||||
|
} elseif ( ! headers_sent() && 'GET' === $_SERVER['REQUEST_METHOD'] && ! is_user_logged_in() ) {
|
||||||
|
header( 'Vary: Origin', false );
|
||||||
|
} elseif ( ! headers_sent() && 'GET' === $_SERVER['REQUEST_METHOD'] && ! is_user_logged_in() ) {
|
||||||
header( 'Vary: Origin' );
|
header( 'Vary: Origin' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.2.4-alpha-46482';
|
$wp_version = '5.2.4-alpha-46484';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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