WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/21/2019 04:05:13 PM (8 weeks ago)
Author:
ocean90
Message:

Site Health: Don't verify SSL certificate when testing the local site.

The SSL certificate may be self-signed which prevents various tests from returning proper results. Since the Cron API and file editors don't verify the certificate the tests shouldn't either.

Props Clorith, ocean90.
Fixes #47957.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php

    r45932 r46231  
    9696            'Cache-Control' => 'no-cache',
    9797        );
     98        /** This filter is documented in wp-includes/class-wp-http-streams.php */
     99        $sslverify = apply_filters( 'https_local_ssl_verify', false );
    98100
    99101        // Include Basic auth in loopback requests.
     
    109111        );
    110112
    111         $test = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout' ) );
     113        $test = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );
    112114
    113115        if ( is_wp_error( $test ) ) {
Note: See TracChangeset for help on using the changeset viewer.