| @@ -117,9 +117,9 @@ | ||
| 117 | 117 | $known_ips = array_unique( $known_ips ); |
| 118 | 118 | |
| 119 | 119 | foreach ( $headers_to_check as $header ) { |
| 120 | 120 | $ips = defender_get_data_from_request( $header, 's' ); |
| 121 | - if ( ! empty( $ips ) ) { | |
| 121 | + if ( ! is_null( $ips ) && '' !== $ips ) { | |
| 122 | 122 | $ips = array_map( 'trim', preg_split( '/[\s,]+/', $ips ) ); |
| 123 | 123 | foreach ( $ips as $ip ) { |
| 124 | 124 | if ( in_array( $ip, $known_ips, true ) ) { |
| 125 | 125 | update_site_option( self::SMART_IP_DETECTION_HEADER, $header ); |
| @@ -176,9 +176,9 @@ | ||
| 176 | 176 | ), |
| 177 | 177 | admin_url( 'admin-ajax.php' ) |
| 178 | 178 | ); |
| 179 | 179 | $args = array( |
| 180 | - 'sslverify' => false, // Many hosts have no updated CA bundle. | |
| 180 | + 'sslverify' => true, | |
| 181 | 181 | ); |
| 182 | 182 | $response = wp_remote_get( $url, $args ); |
| 183 | 183 | |
| 184 | 184 | if ( is_wp_error( $response ) ) { |