aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2020-09-03 10:35:23 +0200
committerGravatar GitHub <noreply@github.com> 2020-09-03 10:35:23 +0200
commitbe5f9f2dceba7b67041295914169fcbbbb07e5fd (patch)
tree35ef04e9effd8b18b69ee4d7b7ba11011eff2c3d /app/Models/Entry.php
parent6fac0e40c4d3bc0e51a124015dcde9b7d766f7b5 (diff)
When ssl_verify is false, decrease SSL security (#3171)
When ssl_verify option is set to false for a feed, allow lower security such as SHA-1 signatures. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900984 https://stackoverflow.com/questions/58342699/php-curl-curl-error-35-error1414d172ssl-routinestls12-check-peer-sigalgwr Fix error of type `cURL error 35: error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature` Example of feeds: https://www.version2.dk/it-nyheder/rss https://ing.dk/rss/nyheder
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index 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);