Remove all sslverify false

Closes #8058 cc @claudiosmweb @roykho @barrykooij
This commit is contained in:
Mike Jolley 2015-05-05 13:39:34 +01:00
parent 7254e45edc
commit 5a92126a39
7 changed files with 6 additions and 11 deletions

View File

@ -404,7 +404,7 @@ class WC_Admin_Welcome {
return $contributors; return $contributors;
} }
$response = wp_remote_get( 'https://api.github.com/repos/woothemes/woocommerce/contributors', array( 'sslverify' => false ) ); $response = wp_remote_get( 'https://api.github.com/repos/woothemes/woocommerce/contributors' );
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
return array(); return array();

View File

@ -224,7 +224,6 @@ if ( ! defined( 'ABSPATH' ) ) {
$posting['wp_remote_post']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'PayPal uses this method of communicating when sending back transaction information.', 'woocommerce' ) . '">[?]</a>'; $posting['wp_remote_post']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'PayPal uses this method of communicating when sending back transaction information.', 'woocommerce' ) . '">[?]</a>';
$response = wp_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array( $response = wp_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array(
'sslverify' => false,
'timeout' => 60, 'timeout' => 60,
'user-agent' => 'WooCommerce/' . WC()->version, 'user-agent' => 'WooCommerce/' . WC()->version,
'body' => array( 'body' => array(

View File

@ -109,7 +109,7 @@ class WC_Language_Pack_Upgrader {
* @return bool * @return bool
*/ */
public function check_if_language_pack_exists() { public function check_if_language_pack_exists() {
$response = wp_remote_get( $this->get_language_package_uri(), array( 'sslverify' => false, 'timeout' => 60 ) ); $response = wp_remote_get( $this->get_language_package_uri(), array( 'timeout' => 60 ) );
if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) { if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
return true; return true;
@ -188,7 +188,7 @@ class WC_Language_Pack_Upgrader {
} }
// Download the language pack // Download the language pack
$response = wp_remote_get( $this->get_language_package_uri(), array( 'sslverify' => false, 'timeout' => 60 ) ); $response = wp_remote_get( $this->get_language_package_uri(), array( 'timeout' => 60 ) );
if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) { if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
global $wp_filesystem; global $wp_filesystem;

View File

@ -191,7 +191,6 @@ class WC_Webhook {
'timeout' => MINUTE_IN_SECONDS, 'timeout' => MINUTE_IN_SECONDS,
'redirection' => 0, 'redirection' => 0,
'httpversion' => '1.0', 'httpversion' => '1.0',
'sslverify' => false,
'blocking' => true, 'blocking' => true,
'user-agent' => sprintf( 'WooCommerce/%s Hookshot (WordPress/%s)', WC_VERSION, $GLOBALS['wp_version'] ), 'user-agent' => sprintf( 'WooCommerce/%s Hookshot (WordPress/%s)', WC_VERSION, $GLOBALS['wp_version'] ),
'body' => trim( json_encode( $payload ) ), 'body' => trim( json_encode( $payload ) ),

View File

@ -76,7 +76,6 @@ class WC_Gateway_Paypal_IPN_Handler extends WC_Gateway_Paypal_Response {
// Send back post vars to paypal // Send back post vars to paypal
$params = array( $params = array(
'body' => $validate_ipn, 'body' => $validate_ipn,
'sslverify' => false,
'timeout' => 60, 'timeout' => 60,
'httpversion' => '1.1', 'httpversion' => '1.1',
'compress' => false, 'compress' => false,

View File

@ -36,7 +36,6 @@ class WC_Gateway_Paypal_PDT_Handler extends WC_Gateway_Paypal_Response {
'tx' => $transaction, 'tx' => $transaction,
'at' => $this->identity_token 'at' => $this->identity_token
), ),
'sslverify' => false,
'timeout' => 60, 'timeout' => 60,
'httpversion' => '1.1', 'httpversion' => '1.1',
'user-agent' => 'WooCommerce/' . WC_VERSION 'user-agent' => 'WooCommerce/' . WC_VERSION

View File

@ -59,7 +59,6 @@ class WC_Gateway_Paypal_Refund {
'method' => 'POST', 'method' => 'POST',
'body' => self::get_request( $order, $amount, $reason ), 'body' => self::get_request( $order, $amount, $reason ),
'timeout' => 70, 'timeout' => 70,
'sslverify' => false,
'user-agent' => 'WooCommerce', 'user-agent' => 'WooCommerce',
'httpversion' => '1.1' 'httpversion' => '1.1'
) )