Patch for "master" branch: https://reviews.mahara.org/8906
-- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1773864 Title: ExternalFeed block cron task fails when SSL cert is not valid for a feed Status in Mahara: New Bug description: Mahara: 18.04 OS: Linux DB: Postgres Browser: n/a Cron fails (and is therefore locked) when one of the rss feeds has an invalid ssl certificate. The cron job calls lib/web.php::mahara_http_request() from blocktype/externalfeed/lib.php::parse_feed() The following error results: [WAR] 63 (lib/web.php:4425) Curl error: 60: SSL certificate problem: unable to get local issuer certificate Call stack (most recent first): * log_message("Curl error: 60: SSL certificate problem: unable to...", 8, true, true) at /var/www/mahara/htdocs/lib/errors.php:95 * log_warn("Curl error: 60: SSL certificate problem: unable to...") at /var/www/mahara/htdocs/lib/web.php:4425 * mahara_http_request(array(size 3), false) at /var/www/mahara/htdocs/blocktype/externalfeed/lib.php:421 * PluginBlocktypeExternalfeed::parse_feed("http://www.safeworkaustralia.gov.au/sites/SWA/medi...", "0", "", "********") at /var/www/mahara/htdocs/blocktype/externalfeed/lib.php:336 * PluginBlocktypeExternalfeed::refresh_feeds() at /var/www/mahara/htdocs/lib/mahara.php:1809 * call_static_method("PluginBlocktypeExternalfeed", "refresh_feeds") at /var/www/mahara/htdocs/lib/cron.php:115 [WAR] 63 (blocktype/externalfeed/lib.php:336) error in /blocktype/externalfeed/lib.php line 428. error:SSL certificate problem: unable to get local issuer certificate [WAR] 63 (lib/errors.php:536) [Error]: Wrong parameters for MaharaException([string $message [, long $code [, Throwable $previous = NULL]]]) Call stack (most recent first): * exception(object(Error)) at Unknown:0 I had added extra debugging statements to see the error: [WAR] 63 (blocktype/externalfeed/lib.php:336) error in /blocktype/externalfeed/lib.php line 428. error:SSL certificate problem: unable to get local issuer certificate Mahara then raises a MaharaException with the error (SSL certificate problem: unable to get local issuer certificate) as the code. But, it's not an integer so it fails with: [WAR] 63 (lib/errors.php:536) [Error]: Wrong parameters for MaharaException([string $message [, long $code [, Throwable $previous = NULL]]]) We need to check if the error coming back is a number or string. If number, pass it as the code in the MaharaException. Otherwise, append it to the text of the error message so the data is not lost. We found this when upgrading from 17.04 to 18.04. This issue is present in 17.04 as well. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1773864/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

