A free, self-hostable news aggregator…
When ssl_verify is false, decrease SSL security (#3171)
Alexandre Alapetitebe5f9f2dceba
diff --git a/app/Models/Entry.php b/app/Models/Entry.phpindex 75d8da12c..ed0c1245c 100644--- a/app/Models/Entry.php+++ b/app/Models/Entry.php@@ -381,6 +381,9 @@ class FreshRSS_Entry extends Minz_Model {if (isset($attributes['ssl_verify'])) {curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $attributes['ssl_verify'] ? 2 : 0);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $attributes['ssl_verify'] ? true : false);+ if (!$attributes['ssl_verify']) {+ curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'DEFAULT@SECLEVEL=1');+ }}$html = curl_exec($ch);$c_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);diff --git a/lib/lib_rss.php b/lib/lib_rss.phpindex 8a58d2124..5c0a8a2bf 100644--- a/lib/lib_rss.php+++ b/lib/lib_rss.php@@ -184,6 +184,9 @@ function customSimplePie($attributes = array()) {if (isset($attributes['ssl_verify'])) {$curl_options[CURLOPT_SSL_VERIFYHOST] = $attributes['ssl_verify'] ? 2 : 0;$curl_options[CURLOPT_SSL_VERIFYPEER] = $attributes['ssl_verify'] ? true : false;+ if (!$attributes['ssl_verify']) {+ $curl_options[CURLOPT_SSL_CIPHER_LIST] = 'DEFAULT@SECLEVEL=1';+ }}$simplePie->set_curl_options($curl_options);