rebase code on oct-10-2023
This commit is contained in:
@@ -259,23 +259,12 @@ function wpcf7_is_file_path_in_content_dir( $path ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
str_starts_with( $path, trailingslashit( realpath( WP_CONTENT_DIR ) ) )
|
||||
) {
|
||||
if ( 0 === strpos( $path, realpath( WP_CONTENT_DIR ) ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
defined( 'UPLOADS' ) and
|
||||
str_starts_with( $path, trailingslashit( realpath( ABSPATH . UPLOADS ) ) )
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
defined( 'WP_TEMP_DIR' ) and
|
||||
str_starts_with( $path, trailingslashit( realpath( WP_TEMP_DIR ) ) )
|
||||
) {
|
||||
if ( defined( 'UPLOADS' )
|
||||
and 0 === strpos( $path, realpath( ABSPATH . UPLOADS ) ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user