Merge pull request #309 from HungryFeline/patch-3
Don't check the certificate when transloading
This commit is contained in:
commit
3febf0e443
@ -713,7 +713,7 @@ function get_prefixed_cookie(/*string*/ $name) {
|
|||||||
*/
|
*/
|
||||||
function set_prefixed_cookie($name, $value, $time, $path) {
|
function set_prefixed_cookie($name, $value, $time, $path) {
|
||||||
global $config;
|
global $config;
|
||||||
$full_name = $config->get_string('cookie_prefix','shm')."_".$name;
|
$full_name = COOKIE_PREFIX."_".$name;
|
||||||
setcookie($full_name, $value, $time, $path);
|
setcookie($full_name, $value, $time, $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -805,6 +805,7 @@ function transload($url, $mfile) {
|
|||||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
curl_setopt($ch, CURLOPT_REFERER, $url);
|
curl_setopt($ch, CURLOPT_REFERER, $url);
|
||||||
curl_setopt($ch, CURLOPT_USERAGENT, "Shimmie-".VERSION);
|
curl_setopt($ch, CURLOPT_USERAGENT, "Shimmie-".VERSION);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
|
|
||||||
curl_exec($ch);
|
curl_exec($ch);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
@ -816,7 +817,7 @@ function transload($url, $mfile) {
|
|||||||
if($config->get_string("transload_engine") == "wget") {
|
if($config->get_string("transload_engine") == "wget") {
|
||||||
$s_url = escapeshellarg($url);
|
$s_url = escapeshellarg($url);
|
||||||
$s_mfile = escapeshellarg($mfile);
|
$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);
|
return file_exists($mfile);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user