Make WordPress Core


Ignore:
Timestamp:
09/22/2023 07:06:45 PM (2 years ago)
Author:
adamsilverstein
Message:

Security: remove the cron event that checked for https support.

Fix an issue where a cron job ran every 12 hours to check for https support - even when https support was already enabled. The check is now run only when the user visits the Site Health page. Reducing the unneeded requests lowers the impact and load of hosting WordPress sites.

The wp_update_https_detection_errors function is deprecated and the https_detection_errors option that was previously set by the cron job is no longer maintained. The pre_wp_update_https_detection_errors filter is deprecated and replaced by the pre_wp_get_https_detection_errors filter which serves the same function.

Props audrasjb, johnbillion, Michi91.
Fixes #58494.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r56529 r56664  
    388388}
    389389
    390 // HTTPS detection.
    391 add_action( 'init', 'wp_schedule_https_detection' );
    392 add_action( 'wp_https_detection', 'wp_update_https_detection_errors' );
    393 add_filter( 'cron_request', 'wp_cron_conditionally_prevent_sslverify', 9999 );
    394 
    395390// HTTPS migration.
    396391add_action( 'update_option_home', 'wp_update_https_migration_required', 10, 2 );
Note: See TracChangeset for help on using the changeset viewer.