Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloud_announcements.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-04-20 21:42:36 +0300
committerGitHub <noreply@github.com>2021-04-20 21:42:36 +0300
commitc3e44576cc8b1072ed943f9763cc3c50ac44cd8f (patch)
tree33cc3222959745b32f767198bd181eaf742d1439
parenta154822cdf873dbc337b1580b592f6c7eda2147d (diff)
parent3da5da42e0392869272d1a50462bdadf1aa92f98 (diff)
Merge pull request #77 from andyxheli/openssl-fixv22.0.0beta3v22.0.0beta2v22.0.0beta1
Update openssl for PHP 8.0
-rw-r--r--lib/Cron/Crawler.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Cron/Crawler.php b/lib/Cron/Crawler.php
index 0d70db2..daf6d75 100644
--- a/lib/Cron/Crawler.php
+++ b/lib/Cron/Crawler.php
@@ -174,7 +174,11 @@ class Crawler extends TimedJob {
// Check if the signature actually matches the downloaded content
$certificate = openssl_get_publickey(file_get_contents(__DIR__ . '/../../appinfo/certificate.crt'));
$verified = (bool)openssl_verify($feedBody, base64_decode($signature), $certificate, OPENSSL_ALGO_SHA512);
- openssl_free_key($certificate);
+
+ // PHP 8 automatically frees the key instance and deprecates the function
+ if (PHP_VERSION_ID < 80000) {
+ openssl_free_key($certificate);
+ }
if (!$verified) {
// Signature does not match