Merge pull request #309 from HungryFeline/patch-3
Don't check the certificate when transloading
This commit is contained in:
commit
3febf0e443
1 changed files with 3 additions and 2 deletions
|
@ -713,7 +713,7 @@ function get_prefixed_cookie(/*string*/ $name) {
|
|||
*/
|
||||
function set_prefixed_cookie($name, $value, $time, $path) {
|
||||
global $config;
|
||||
$full_name = $config->get_string('cookie_prefix','shm')."_".$name;
|
||||
$full_name = COOKIE_PREFIX."_".$name;
|
||||
setcookie($full_name, $value, $time, $path);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Reference in a new issue