Explorar o código

Do not set TLS options on local URLs

Chris Smith %!s(int64=9) %!d(string=hai) anos
pai
achega
b32aad8439
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Util/RemoteFilesystem.php

+ 1 - 1
src/Composer/Util/RemoteFilesystem.php

@@ -560,7 +560,7 @@ class RemoteFilesystem
         $tlsOptions = array();
 
         // Setup remaining TLS options - the matching may need monitoring, esp. www vs none in CN
-        if ($this->disableTls === false && PHP_VERSION_ID < 50600) {
+        if ($this->disableTls === false && PHP_VERSION_ID < 50600 && !stream_is_local($this->fileUrl)) {
             $host = parse_url($this->fileUrl, PHP_URL_HOST);
 
             if ($host === 'github.com' || $host === 'api.github.com') {