diff --git a/interface/lib/classes/aps_crawler.inc.php b/interface/lib/classes/aps_crawler.inc.php index 7bb2650e09daf6cb87f627b2b2df23feaa58ac81..58a83057ce8c627a31aa21ff3310d81bfb43838f 100644 --- a/interface/lib/classes/aps_crawler.inc.php +++ b/interface/lib/classes/aps_crawler.inc.php @@ -189,6 +189,8 @@ class ApsCrawler extends ApsBase curl_setopt($conn[$i], CURLOPT_TIMEOUT, 0); curl_setopt($conn[$i], CURLOPT_FAILONERROR, 1); curl_setopt($conn[$i], CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($conn[$i], CURLOPT_SSL_VERIFYHOST, 1); + curl_setopt($conn[$i], CURLOPT_SSL_VERIFYPEER, false); curl_multi_add_handle($mh, $conn[$i]); } @@ -283,6 +285,7 @@ class ApsCrawler extends ApsBase $apps_count = substr_count($apps[$j], '0'); if($apps_count == 0) // obviously this vendor provides one or more apps { + try { // Rename namespaces and register them $xml = str_replace("xmlns=", "ns=", $apps[$j]); $sxe = new SimpleXMLElement($xml); @@ -456,9 +459,15 @@ class ApsCrawler extends ApsBase unset($sxe); $apps_in_repo++; + } catch (Exception $e) { + // We dont want the crawler to fail on xml parse errors + $app->log($this->log_prefix.$e->getMessage(), LOGLEVEL_WARN); + //echo 'Caught exception: ', $e->getMessage(), "\n"; + } } } //var_dump($apps); + //echo print_r($apps_to_dl).'
-------------------
'; // For memory reasons, unset the current vendor and his apps unset($apps); diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 3a4fa9ad1fa2c1bded9879fac73681bc4232c4bd..d6ff4f700e1ab034d90bb1e47ffaed81433c433f 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -554,6 +554,7 @@ class ApsInstaller extends ApsBase curl_setopt($conn[$i], CURLOPT_TIMEOUT, 0); curl_setopt($conn[$i], CURLOPT_FAILONERROR, 1); curl_setopt($conn[$i], CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($conn[$i], CURLOPT_SSL_VERIFYPEER, 0); curl_multi_add_handle($mh, $conn[$i]); } @@ -696,6 +697,7 @@ class ApsInstaller extends ApsBase curl_setopt($ch, CURLOPT_TIMEOUT, 0); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); if(curl_exec($ch) === false) $app->log(curl_error($ch), 1); fclose($fh); curl_close($ch);