From 616aa3300a216e4e4d0edaba09e020742666fb34 Mon Sep 17 00:00:00 2001 From: HungryFeline Date: Tue, 2 Jul 2013 04:44:27 +0200 Subject: [PATCH] Don't check the certificate when transloading This allows the download of images via https even if the cert is self-signed. --- core/util.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index 75e28ccd..42d285af 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -805,6 +805,7 @@ function transload($url, $mfile) { curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_USERAGENT, "Shimmie-".VERSION); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_exec($ch); curl_close($ch); @@ -816,7 +817,7 @@ function transload($url, $mfile) { if($config->get_string("transload_engine") == "wget") { $s_url = escapeshellarg($url); $s_mfile = escapeshellarg($mfile); - system("wget $s_url --output-document=$s_mfile"); + system("wget --no-check-certificate $s_url --output-document=$s_mfile"); return file_exists($mfile); }