MDL-40615 Repository: Updated Amazon S3 library
authorFrederic Massart <fred@moodle.com>
Fri, 19 Jul 2013 08:02:56 +0000 (16:02 +0800)
committerSam Hemelryk <sam@moodle.com>
Mon, 29 Jul 2013 21:05:18 +0000 (09:05 +1200)
Fixed insecure use of CURLOPT_SSL_VERIFYHOST

repository/s3/README_MOODLE.txt
repository/s3/S3.php

index a6c5f92..7d79041 100644 (file)
@@ -3,8 +3,7 @@
 Amazon S3 PHP Class
 
 Cloned from git://github.com/tpyo/amazon-s3-php-class.git
-Branch master
-On July 23rd 2012
+At commit 56770370c33a5310c5e07a9d22aef8c162f150ee
 
 https://github.com/tpyo/amazon-s3-php-class
 http://undesigned.org.za/2007/10/22/amazon-s3-php-class
index 247d6c3..4bd5111 100644 (file)
@@ -1809,7 +1809,7 @@ final class S3Request
                if (S3::$useSSL)
                {
                        // SSL Validation can now be optional for those with broken OpenSSL installations
-                       curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, S3::$useSSLValidation ? 1 : 0);
+                       curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, S3::$useSSLValidation ? 2 : 0);
                        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, S3::$useSSLValidation ? 1 : 0);
 
                        if (S3::$sslKey !== null) curl_setopt($curl, CURLOPT_SSLKEY, S3::$sslKey);