Make WordPress Core

Changeset 50659


Ignore:
Timestamp:
04/06/2021 03:22:08 AM (3 years ago)
Author:
peterwilsoncc
Message:

Site Health: Reduce false reports of HTTPS failures.

Reduce severity of failing HTTPS tests from critical to warning. Stop reporting failures if the site is being accessed over HTTPS but wp_is_https_supported() indicates a lack of support.

Props annalamprou, AnotherDave, ayeshrajans, bobbingwide, Clorith, dragongate, eatsleepcode, gab81, geoffrey1963, Ipstenu, k3nsai, mmuyskens, nicegamer7, peterwilsoncc, pwallner, SergeyBiryukov, TimothyBlynJacobs, Toru.
Fixes #52783.

File:
1 edited

Legend:

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

    r50399 r50659  
    15291529            // If the website is not using HTTPS, provide more information about whether it is supported and how it can
    15301530            // be enabled.
    1531             $result['status'] = 'critical';
     1531            $result['status'] = 'warning';
    15321532            $result['label']  = __( 'Your website does not use HTTPS' );
    15331533
     
    16311631                }
    16321632            }
    1633         } elseif ( ! wp_is_https_supported() ) {
    1634             // If the website is using HTTPS, but HTTPS is actually not supported, inform the user about the potential
    1635             // problems.
    1636             $result['status'] = 'critical';
    1637             $result['label']  = __( 'There are problems with the HTTPS connection of your website' );
    1638 
    1639             $https_detection_errors = get_option( 'https_detection_errors' );
    1640             if ( ! empty( $https_detection_errors['ssl_verification_failed'] ) ) {
    1641                 $result['description'] = sprintf(
    1642                     '<p>%s</p>',
    1643                     sprintf(
    1644                         /* translators: %s: URL to Settings > General > WordPress Address. */
    1645                         __( 'Your <a href="%s">WordPress Address</a> is set up to use HTTPS, but the SSL certificate appears to be invalid.' ),
    1646                         esc_url( admin_url( 'options-general.php' ) . '#siteurl' )
    1647                     )
    1648                 );
    1649             } else {
    1650                 $result['description'] = sprintf(
    1651                     '<p>%s</p>',
    1652                     sprintf(
    1653                         /* translators: %s: URL to Settings > General > WordPress Address. */
    1654                         __( 'Your <a href="%s">WordPress Address</a> is set up to use HTTPS, but your website appears to be unavailable when using an HTTPS connection.' ),
    1655                         esc_url( admin_url( 'options-general.php' ) . '#siteurl' )
    1656                     )
    1657                 );
    1658             }
    1659             $result['description'] .= sprintf(
    1660                 '<p>%s</p>',
    1661                 __( 'Talk to your web host about resolving this HTTPS issue for your website.' )
    1662             );
    16631633        }
    16641634
Note: See TracChangeset for help on using the changeset viewer.