Skip to content

Commit

Permalink
MDL-39664 added http redirect limitation to 5. rephrased certificate …
Browse files Browse the repository at this point in the history
…use in message log.
  • Loading branch information
Aparup Banerjee committed May 14, 2013
1 parent 6053036 commit c713414
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mdeploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -1054,14 +1054,15 @@ protected function download_file($source, $target) {
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); // nah, moodle.org is never unavailable! :-p
curl_setopt($ch, CURLOPT_URL, $source);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // Allow redirection, we trust in ssl.
curl_setopt($ch, CURLOPT_MAXREDIRS, 5);

if ($cacertfile = $this->get_cacert()) {
// Do not use CA certs provided by the operating system. Instead,
// use this CA cert to verify the ZIP provider.
$this->log('Using custom CA certificate '.$cacertfile);
curl_setopt($ch, CURLOPT_CAINFO, $cacertfile);
} else {
$this->log('Warning: '.$cacertfile.' not found');
$this->log('Using operating system CA certificates.');
}

$proxy = $this->input->get_option('proxy', false);
Expand Down

0 comments on commit c713414

Please sign in to comment.