Skip to content

Commit

Permalink
Disable verify for SSL
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed Jan 4, 2017
1 parent 3213039 commit 1911b11
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Util/Downloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public function download(Request $request) {
$pathFile = $this->pathDownload . $filename;
$handle = fopen($pathFile, 'w');
$client = new Client();
$client->request('GET', $url, ['sink' => $handle]);
$client->request('GET', $url, array(
'sink' => $handle,
'verify' => false // TODO : allow to pass ssl certificate
));

// Security about fake images
if ($checkFile['isImage']) {
Expand Down Expand Up @@ -120,7 +123,9 @@ private function checkFile($url) {
private function url_exist($url) {
try {
$client = new Client();
$client->request('HEAD', $url);
$client->request('HEAD', $url, array(
'verify' => false // TODO : allow to pass ssl certificate
));
return true;
}
catch (ClientException $e) {
Expand Down

0 comments on commit 1911b11

Please sign in to comment.