浏览代码

Fix #yogosha8845

Laurent Destailleur 3 年之前
父节点
当前提交
558db1b935
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      htdocs/core/lib/geturl.lib.php
  2. 1 1
      htdocs/paypal/lib/paypal.lib.php

+ 1 - 1
htdocs/core/lib/geturl.lib.php

@@ -87,7 +87,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
 
 	// Turning off the server and peer verification(TrustManager Concept).
 	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, ($ssl_verifypeer ? true : false));
-	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
+	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, ($ssl_verifypeer ? true : false));
 
 	// Restrict use to some protocols only
 	$protocols = 0;

+ 1 - 1
htdocs/paypal/lib/paypal.lib.php

@@ -511,7 +511,7 @@ function hash_call($methodName, $nvpStr)
 
 	//turning off the server and peer verification(TrustManager Concept).
 	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, ($ssl_verifypeer ? true : false));
-	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
+	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, ($ssl_verifypeer ? true : false));
 
 	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, empty($conf->global->MAIN_USE_CONNECT_TIMEOUT) ? 5 : $conf->global->MAIN_USE_CONNECT_TIMEOUT);
 	curl_setopt($ch, CURLOPT_TIMEOUT, empty($conf->global->MAIN_USE_RESPONSE_TIMEOUT) ? 30 : $conf->global->MAIN_USE_RESPONSE_TIMEOUT);