[web-downloads] main: Fix calculating hashes

From: Date: Fri, 26 Sep 2025 08:44:13 +0000
Subject: [web-downloads] main: Fix calculating hashes
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-33232@lists.php.net to get a copy of this message
Author: Shivam Mathur (shivammathur) Date: 2025-09-26T14:12:59+05:30 Commit: https://github.com/php/web-downloads/commit/4b389bf2eec00cd75cc16a136d0372b1a0f5d6d3 Raw diff: https://github.com/php/web-downloads/commit/4b389bf2eec00cd75cc16a136d0372b1a0f5d6d3.diff Fix calculating hashes Changed paths: M src/Http/Controllers/SeriesDeleteController.php M src/Http/Controllers/SeriesInitController.php M src/Http/Controllers/SeriesStabilityController.php Diff: diff --git a/src/Http/Controllers/SeriesDeleteController.php b/src/Http/Controllers/SeriesDeleteController.php index 0f54c0a..c0bbd53 100644 --- a/src/Http/Controllers/SeriesDeleteController.php +++ b/src/Http/Controllers/SeriesDeleteController.php @@ -30,7 +30,7 @@ protected function execute(array $data): void { extract($data); $directory = getenv('BUILDS_DIRECTORY') . '/series'; - $hash = hash('sha256', $series) . strtotime('now'); + $hash = hash('sha256', $php_version) . strtotime('now'); $file = $directory . '/series-delete-' . $hash . '.json'; file_put_contents($file, json_encode($data)); } diff --git a/src/Http/Controllers/SeriesInitController.php b/src/Http/Controllers/SeriesInitController.php index 8fa4d7f..bf829ee 100644 --- a/src/Http/Controllers/SeriesInitController.php +++ b/src/Http/Controllers/SeriesInitController.php @@ -31,7 +31,7 @@ protected function execute(array $data): void { extract($data); $directory = getenv('BUILDS_DIRECTORY') . '/series'; - $hash = hash('sha256', $series) . strtotime('now'); + $hash = hash('sha256', $php_version) . strtotime('now'); $file = $directory . '/series-init-' . $hash . '.json'; file_put_contents($file, json_encode($data)); } diff --git a/src/Http/Controllers/SeriesStabilityController.php b/src/Http/Controllers/SeriesStabilityController.php index 9b56840..ffe12a4 100644 --- a/src/Http/Controllers/SeriesStabilityController.php +++ b/src/Http/Controllers/SeriesStabilityController.php @@ -30,7 +30,7 @@ protected function execute(array $data): void { extract($data); $directory = getenv('BUILDS_DIRECTORY') . '/series'; - $hash = hash('sha256', $series) . strtotime('now'); + $hash = hash('sha256', $php_version) . strtotime('now'); $file = $directory . '/series-stability-' . $hash . '.json'; file_put_contents($file, json_encode($data)); }

« previous php.webmaster (#33232) next »