diff --git a/wp-admin/includes/class-wp-site-health-auto-updates.php b/wp-admin/includes/class-wp-site-health-auto-updates.php index 85decaaad2..581fc44600 100644 --- a/wp-admin/includes/class-wp-site-health-auto-updates.php +++ b/wp-admin/includes/class-wp-site-health-auto-updates.php @@ -224,12 +224,18 @@ class WP_Site_Health_Auto_Updates { } $check_dirs = array_unique( $check_dirs ); + $updater = new WP_Automatic_Updater(); + $checkout = false; // Search all directories we've found for evidence of version control. foreach ( $vcs_dirs as $vcs_dir ) { foreach ( $check_dirs as $check_dir ) { - // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition,Squiz.PHP.DisallowMultipleAssignments - if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) ) { + if ( ! $updater->is_allowed_dir( $check_dir ) ) { + continue; + } + + $checkout = is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ); + if ( $checkout ) { break 2; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index a4ec5965e9..28f00871ae 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58920'; +$wp_version = '6.7-alpha-58921'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.