A free, self-hostable news aggregator…
Back-compatibility cURL 7.51 (#7409)
Alexandre Alapetited80171ebfddd
diff --git a/app/i18n/cs/index.php b/app/i18n/cs/index.phpindex 851952142..bf40cc431 100644--- a/app/i18n/cs/index.php+++ b/app/i18n/cs/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/de/index.php b/app/i18n/de/index.phpindex 7d0bfc784..4b7eff8ea 100644--- a/app/i18n/de/index.php+++ b/app/i18n/de/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // IGNORE'database' => 'Datenbank','server_software' => 'Serversoftware',+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS-Version','version_php' => 'PHP-Version',),diff --git a/app/i18n/el/index.php b/app/i18n/el/index.phpindex 115300df0..f49c5e2af 100644--- a/app/i18n/el/index.php+++ b/app/i18n/el/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/en-us/index.php b/app/i18n/en-us/index.phpindex 5e7e33090..fa5340ab4 100644--- a/app/i18n/en-us/index.php+++ b/app/i18n/en-us/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // IGNORE'database' => 'Database', // IGNORE'server_software' => 'Server software', // IGNORE+ 'version_curl' => 'cURL version', // IGNORE'version_frss' => 'FreshRSS version', // IGNORE'version_php' => 'PHP version', // IGNORE),diff --git a/app/i18n/en/index.php b/app/i18n/en/index.phpindex 0492a4694..7dd202049 100644--- a/app/i18n/en/index.php+++ b/app/i18n/en/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version','version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/es/index.php b/app/i18n/es/index.phpindex 5b8a35634..c1636298a 100644--- a/app/i18n/es/index.php+++ b/app/i18n/es/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/fa/index.php b/app/i18n/fa/index.phpindex e184a0617..b5b156dcc 100644--- a/app/i18n/fa/index.php+++ b/app/i18n/fa/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/fi/index.php b/app/i18n/fi/index.phpindex 9cc0a4ad0..16fbfb999 100644--- a/app/i18n/fi/index.php+++ b/app/i18n/fi/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/fr/index.php b/app/i18n/fr/index.phpindex c1cb5647c..63d3d8f3e 100644--- a/app/i18n/fr/index.php+++ b/app/i18n/fr/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Navigateur','database' => 'Base de données','server_software' => 'Serveur Web',+ 'version_curl' => 'Version de cURL','version_frss' => 'Version de FreshRSS','version_php' => 'Version de PHP',),diff --git a/app/i18n/he/index.php b/app/i18n/he/index.phpindex 6e75eff27..9d88228a3 100644--- a/app/i18n/he/index.php+++ b/app/i18n/he/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/hu/index.php b/app/i18n/hu/index.phpindex f1c39f128..d6f998b5e 100755--- a/app/i18n/hu/index.php+++ b/app/i18n/hu/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Böngésző','database' => 'Adatbázis','server_software' => 'Szerver szoftver',+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS verzió','version_php' => 'PHP verzió',),diff --git a/app/i18n/id/index.php b/app/i18n/id/index.phpindex 2cacf7547..1b520a9ad 100644--- a/app/i18n/id/index.php+++ b/app/i18n/id/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/it/index.php b/app/i18n/it/index.phpindex 95a5c14d1..1da831aca 100644--- a/app/i18n/it/index.php+++ b/app/i18n/it/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // IGNORE'database' => 'Database', // IGNORE'server_software' => 'Software server',+ 'version_curl' => 'Versione cURL','version_frss' => 'Versione FreshRSS','version_php' => 'Versione PHP',),diff --git a/app/i18n/ja/index.php b/app/i18n/ja/index.phpindex acee8d2f2..cb89e66c4 100644--- a/app/i18n/ja/index.php+++ b/app/i18n/ja/index.php@@ -20,6 +20,7 @@ return array('browser' => 'ブラウザ','database' => 'データベース','server_software' => 'サーバーソフトウェア',+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSSバージョン','version_php' => 'PHPバージョン',),diff --git a/app/i18n/ko/index.php b/app/i18n/ko/index.phpindex ed6612aac..565fbde0a 100644--- a/app/i18n/ko/index.php+++ b/app/i18n/ko/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/lv/index.php b/app/i18n/lv/index.phpindex 96bd80a4d..75e66c9ac 100644--- a/app/i18n/lv/index.php+++ b/app/i18n/lv/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/nl/index.php b/app/i18n/nl/index.phpindex 4175ef92c..4dc5ea099 100644--- a/app/i18n/nl/index.php+++ b/app/i18n/nl/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/oc/index.php b/app/i18n/oc/index.phpindex 02bda23c6..148b4c4f6 100644--- a/app/i18n/oc/index.php+++ b/app/i18n/oc/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/pl/index.php b/app/i18n/pl/index.phpindex 953621a9f..24d5c7752 100644--- a/app/i18n/pl/index.php+++ b/app/i18n/pl/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/pt-br/index.php b/app/i18n/pt-br/index.phpindex 4f173d69e..ba0d5852a 100644--- a/app/i18n/pt-br/index.php+++ b/app/i18n/pt-br/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/pt-pt/index.php b/app/i18n/pt-pt/index.phpindex 56dc33501..6f73e706c 100644--- a/app/i18n/pt-pt/index.php+++ b/app/i18n/pt-pt/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/ru/index.php b/app/i18n/ru/index.phpindex 457fc3fee..bf21b7f14 100644--- a/app/i18n/ru/index.php+++ b/app/i18n/ru/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/sk/index.php b/app/i18n/sk/index.phpindex daa611ee5..44c5031ab 100644--- a/app/i18n/sk/index.php+++ b/app/i18n/sk/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/tr/index.php b/app/i18n/tr/index.phpindex 7268044e7..b23d267d7 100644--- a/app/i18n/tr/index.php+++ b/app/i18n/tr/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/zh-cn/index.php b/app/i18n/zh-cn/index.phpindex c42d95647..c43b43aac 100644--- a/app/i18n/zh-cn/index.php+++ b/app/i18n/zh-cn/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/i18n/zh-tw/index.php b/app/i18n/zh-tw/index.phpindex e01707863..4f1ccb7fc 100644--- a/app/i18n/zh-tw/index.php+++ b/app/i18n/zh-tw/index.php@@ -20,6 +20,7 @@ return array('browser' => 'Browser', // TODO'database' => 'Database', // TODO'server_software' => 'Server software', // TODO+ 'version_curl' => 'cURL version', // TODO'version_frss' => 'FreshRSS version', // TODO'version_php' => 'PHP version', // TODO),diff --git a/app/install.php b/app/install.phpindex 719d1b4d8..781924890 100644--- a/app/install.php+++ b/app/install.php@@ -462,7 +462,7 @@ function printStep1(): void {printStep1Template('pdo', $res['pdo']);$curlVersion = function_exists('curl_version') ? curl_version() : [];$curlVersion = is_string($curlVersion['version'] ?? null) ? $curlVersion['version'] : '';- printStep1Template('curl', $res['curl'], [$curlVersion]);+ printStep1Template('curl', $res['curl'], [$curlVersion]); // TODO: We actually require cURL >= 7.52 for CURLPROXY_HTTPSprintStep1Template('json', $res['json']);printStep1Template('pcre', $res['pcre']);printStep1Template('ctype', $res['ctype']);diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtmlindex 54d3e77a0..41d879843 100644--- a/app/views/helpers/feed/update.phtml+++ b/app/views/helpers/feed/update.phtml@@ -749,6 +749,7 @@<label class="group-name" for="proxy_type"><?= _t('sub.feed.proxy') ?></label><div class="group-controls"><select name="proxy_type" id="proxy_type"><?php+ defined('CURLPROXY_HTTPS') or define('CURLPROXY_HTTPS', 2); // Compatibility cURL 7.51$type = $curlParams[CURLOPT_PROXYTYPE] ?? '';if ($type === 3) { // Legacy for NONE$type = -1;diff --git a/app/views/index/about.phtml b/app/views/index/about.phtmlindex 70f9b6641..fc28608f7 100644--- a/app/views/index/about.phtml+++ b/app/views/index/about.phtml@@ -26,6 +26,14 @@<dd><?= htmlspecialchars(FRESHRSS_VERSION, ENT_NOQUOTES, 'UTF-8') ?></dd><dt><?= _t('index.about.bug_reports.environment_information.version_php') ?></dt><dd><?= htmlspecialchars(PHP_VERSION, ENT_NOQUOTES, 'UTF-8') ?></dd>+ <dt><?= _t('index.about.bug_reports.environment_information.version_curl') ?></dt>+ <?php+ $curlVersion = curl_version() ?: [];+ $curlVersionVersion = is_string($curlVersion['version'] ?? null) ? $curlVersion['version'] : '';+ $sslversion = is_string($curlVersion['ssl_version'] ?? null) ? $curlVersion['ssl_version'] : '';+ ?>+ <dd><?= htmlspecialchars($curlVersionVersion, ENT_NOQUOTES, 'UTF-8') ?></dd>+ <dd><?= htmlspecialchars($sslversion, ENT_NOQUOTES, 'UTF-8') ?></dd><dt><?= _t('index.about.bug_reports.environment_information.database') ?></dt><dd><?= htmlspecialchars(FreshRSS_Context::systemConf()->db['type'], ENT_NOQUOTES, 'UTF-8') ?></dd><?php $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); ?>diff --git a/app/views/subscription/add.phtml b/app/views/subscription/add.phtmlindex 50d3380a8..382fa5541 100644--- a/app/views/subscription/add.phtml+++ b/app/views/subscription/add.phtml@@ -315,6 +315,7 @@<label class="group-name" for="proxy_type"><?= _t('sub.feed.proxy') ?></label><div class="group-controls"><select class="number" name="proxy_type" id="proxy_type"><?php+ defined('CURLPROXY_HTTPS') or define('CURLPROXY_HTTPS', 2); // Compatibility cURL 7.51foreach (['' => '', -1 => 'NONE', CURLPROXY_HTTP => 'HTTP', CURLPROXY_HTTPS => 'HTTPS',CURLPROXY_SOCKS4 => 'SOCKS4', CURLPROXY_SOCKS4A => 'SOCKS4A', CURLPROXY_SOCKS5 => 'SOCKS5',CURLPROXY_SOCKS5_HOSTNAME => 'SOCKS5H'] as $k => $v) {diff --git a/lib/lib_install.php b/lib/lib_install.phpindex e78de565b..44bedd218 100644--- a/lib/lib_install.php+++ b/lib/lib_install.php@@ -7,7 +7,7 @@ FreshRSS_UserConfiguration::register('default_user', join_path(FRESHRSS_PATH, 'c/** @return array<string,string> */function checkRequirements(string $dbType = ''): array {$php = version_compare(PHP_VERSION, FRESHRSS_MIN_PHP_VERSION) >= 0;- $curl = extension_loaded('curl');+ $curl = extension_loaded('curl'); // TODO: We actually require cURL >= 7.52 for CURLPROXY_HTTPS$pdo_mysql = extension_loaded('pdo_mysql');$pdo_sqlite = extension_loaded('pdo_sqlite');$pdo_pgsql = extension_loaded('pdo_pgsql');