diff --git a/includes/validation-functions.php b/includes/validation-functions.php index 0b88181c..53f4afe7 100644 --- a/includes/validation-functions.php +++ b/includes/validation-functions.php @@ -272,5 +272,12 @@ function wpcf7_is_file_path_in_content_dir( $path ) { return true; } + if ( + defined( 'WP_TEMP_DIR' ) and + str_starts_with( $path, trailingslashit( realpath( WP_TEMP_DIR ) ) ) + ) { + return true; + } + return false; }