Skip to content

Commit

Permalink
Remove all sslverify false
Browse files Browse the repository at this point in the history
Closes woocommerce#8058 cc @claudiosmweb @roykho @barrykooij
  • Loading branch information
mikejolley committed May 5, 2015
1 parent 7254e45 commit 5a92126
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion includes/admin/class-wc-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public function get_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 ) ) {
return array();
Expand Down
1 change: 0 additions & 1 deletion includes/admin/views/html-admin-page-status-report.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@
$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(
'sslverify' => false,
'timeout' => 60,
'user-agent' => 'WooCommerce/' . WC()->version,
'body' => array(
Expand Down
4 changes: 2 additions & 2 deletions includes/class-wc-language-pack-upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function configure_woocommerce_upgrade_notice() {
* @return bool
*/
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 ) {
return true;
Expand Down Expand Up @@ -188,7 +188,7 @@ public function manual_language_update() {
}

// 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 ) {
global $wp_filesystem;

Expand Down
1 change: 0 additions & 1 deletion includes/class-wc-webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ public function deliver( $arg ) {
'timeout' => MINUTE_IN_SECONDS,
'redirection' => 0,
'httpversion' => '1.0',
'sslverify' => false,
'blocking' => true,
'user-agent' => sprintf( 'WooCommerce/%s Hookshot (WordPress/%s)', WC_VERSION, $GLOBALS['wp_version'] ),
'body' => trim( json_encode( $payload ) ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public function validate_ipn() {
// Send back post vars to paypal
$params = array(
'body' => $validate_ipn,
'sslverify' => false,
'timeout' => 60,
'httpversion' => '1.1',
'compress' => false,
Expand Down Expand Up @@ -184,9 +183,9 @@ protected function payment_status_completed( $order, $posted ) {

if ( ! empty( $posted['mc_fee'] ) ) {
// log paypal transaction fee
update_post_meta( $order->id, 'PayPal Transaction Fee', wc_clean( $posted['mc_fee'] ) );
update_post_meta( $order->id, 'PayPal Transaction Fee', wc_clean( $posted['mc_fee'] ) );
}

} else {
$this->payment_on_hold( $order, sprintf( __( 'Payment pending: %s', 'woocommerce' ), $posted['pending_reason'] ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ protected function validate_transaction( $transaction ) {
'tx' => $transaction,
'at' => $this->identity_token
),
'sslverify' => false,
'timeout' => 60,
'httpversion' => '1.1',
'user-agent' => 'WooCommerce/' . WC_VERSION
Expand Down Expand Up @@ -78,7 +77,7 @@ public function check_response() {

if ( ! empty( $_REQUEST['mc_fee'] ) ) {
// log paypal transaction fee
update_post_meta( $order->id, 'PayPal Transaction Fee', wc_clean( $_REQUEST['mc_fee'] ) );
update_post_meta( $order->id, 'PayPal Transaction Fee', wc_clean( $_REQUEST['mc_fee'] ) );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public static function refund_order( $order, $amount = null, $reason = '', $sand
'method' => 'POST',
'body' => self::get_request( $order, $amount, $reason ),
'timeout' => 70,
'sslverify' => false,
'user-agent' => 'WooCommerce',
'httpversion' => '1.1'
)
Expand Down

0 comments on commit 5a92126

Please sign in to comment.