Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: Correctly check result of function
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed May 15, 2024
commit 234e9f828a7d334f6a645229202634b12a9df9b0
2 changes: 1 addition & 1 deletion lib/Cron/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ protected function loadFeed() {

// 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);
$verified = openssl_verify($feedBody, base64_decode($signature), $certificate, OPENSSL_ALGO_SHA512) === 1;

// PHP 8 automatically frees the key instance and deprecates the function
if (PHP_VERSION_ID < 80000) {
Expand Down