aboutsummaryrefslogtreecommitdiffstats
path: root/en
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2021-03-05 17:18:41 +0100
committerfilip <filip.komar@gmail.com>2021-03-05 17:18:41 +0100
commit46382926884e8f52d545c276453b2a7a4857c8c6 (patch)
treec2f0acca6817318f8bb82972ea5ded4ce9c8e8ec /en
parent88429aecc5df00951ece0358f5642861d39b2cfc (diff)
downloadwww-46382926884e8f52d545c276453b2a7a4857c8c6.tar
www-46382926884e8f52d545c276453b2a7a4857c8c6.tar.gz
www-46382926884e8f52d545c276453b2a7a4857c8c6.tar.bz2
www-46382926884e8f52d545c276453b2a7a4857c8c6.tar.xz
www-46382926884e8f52d545c276453b2a7a4857c8c6.zip
properly add sha3 verification (mga#28466)
Diffstat (limited to 'en')
-rw-r--r--en/downloads/get/index.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php
index 846cb5f32..1c9b93f23 100644
--- a/en/downloads/get/index.php
+++ b/en/downloads/get/index.php
@@ -253,14 +253,21 @@ if(isset($product['obsolete'])) {
<div class="dlinfo">
<p><?php echo $dl2_mirror_alt; ?></p>
<?php
-$checksums = array('md5', 'sha1', 'sha512');
+$checksum_specifics = array(
+ 'md5' => array('md5sum', _r('md5 hash of the contents of the iso image')),
+ 'sha1' => array('sha1sum', _r('sha1 512 bit hash')),
+ 'sha512'=> array('sha512sum', _r('sha2 512 bit hash')),
+ 'sha3' => array('sha3-512sum', _r('sha3 512 bit hash'))
+);
$sum_links = array();
$chksm_cmd = '';
$sig_links = array();
-foreach ($checksums as $checksum) {
+foreach (array_keys($checksum_specifics) as $checksum) {
if (isset($product[$checksum])) {
- $sum_links[] = "<a href=\"$download.$checksum\">" . basename($download) . '.' . $checksum .'</a><span class="copy-icon" data-toggle="tooltip" title="' . _r("Copy"). '" data-clip="'. $product[$checksum]. '"></span>';
- $chksm_cmd .= '$ ' . $checksum . 'sum -c ' . basename($download) . '.' . $checksum . ' # ' . _r('You need both iso and checksum file in the same folder');
+ $each_checksum = "<a href=\"$download.$checksum\">" . basename($download) . '.' . $checksum . '</a><span class="copy-icon" data-toggle="tooltip" title="';
+ $each_checksum .= _r("Copy") . '" data-clip="' . $product[$checksum] . '"></span> (' . $checksum_specifics[$checksum][1] . ')';
+ $sum_links[] = $each_checksum;
+ $chksm_cmd .= '$ ' . $checksum_specifics[$checksum][0] . ' -c ' . basename($download) . '.' . $checksum . ' # ' . _r('You need both iso and checksum file in the same folder');
$chksm_cmd .= "\n<strong>" . basename($download) . ": " . _r("OK") . " </strong>\n" . PHP_EOL;
if (isset($product["$checksum.gpg"])) {
$sig_links[] = "<a href=\"$download.$checksum.gpg\">" . basename($download) . ".$checksum.gpg</a>";