Skip to content

Commit

Permalink
Treat WP_TEMP_DIR as a content directory
Browse files Browse the repository at this point in the history
Fixes #1282
  • Loading branch information
takayukister committed Sep 19, 2023
1 parent c862b60 commit 42b605a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/validation-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 42b605a

Please sign in to comment.