rebase on oct-10-2023
This commit is contained in:
@@ -108,14 +108,14 @@ class File_Upload_Upgrader {
|
||||
$this->filename = sanitize_file_name( $_GET[ $urlholder ] );
|
||||
$this->package = $uploads['basedir'] . '/' . $this->filename;
|
||||
|
||||
if ( 0 !== strpos( realpath( $this->package ), realpath( $uploads['basedir'] ) ) ) {
|
||||
if ( ! str_starts_with( realpath( $this->package ), realpath( $uploads['basedir'] ) ) ) {
|
||||
wp_die( __( 'Please select a file' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the attachment/uploaded file.
|
||||
* Deletes the attachment/uploaded file.
|
||||
*
|
||||
* @since 3.2.2
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user