Skip to content

Commit 96b0996

Browse files
committed
Remove md5 checksum
1 parent e04d75e commit 96b0996

5 files changed

Lines changed: 8 additions & 24 deletions

File tree

include/layout.inc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,9 @@ function site_footer(array $config = []): void
504504
require __DIR__ . "/footer.inc";
505505
}
506506

507-
function checksum_html(string $checksum, string $algorithm = 'sha256'): string
507+
function sha256_html(string $checksum): string
508508
{
509509
$checksum = htmlspecialchars($checksum, ENT_QUOTES, 'UTF-8');
510-
$algorithm = htmlspecialchars($algorithm, ENT_QUOTES, 'UTF-8');
511-
512-
if ($algorithm !== 'sha256') {
513-
return '<span class="' . $algorithm . 'sum">' . $checksum . '</span>';
514-
}
515510

516511
return '<span class="sha256-row"><span class="sha256">' . $checksum . '</span><button type="button" class="sha256-copy" data-copy-text="' . $checksum . '" aria-label="Copy sha256 checksum">Copy</button></span>';
517512
}

include/version.inc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,8 @@ function show_source_releases()
139139
<?php download_link($rel['filename'], $rel['filename']); ?>
140140
<span class="releasedate"><?php echo date('d M Y', strtotime($rel['date'])); ?></span>
141141
<?php
142-
if (isset($rel['md5'])) {
143-
echo '<span class="md5sum">', $rel['md5'], '</span>';
144-
}
145142
if (isset($rel['sha256'])) {
146-
echo checksum_html($rel['sha256']);
143+
echo sha256_html($rel['sha256']);
147144
}
148145
?>
149146
<?php if (isset($rel['note']) && $rel['note']): ?>

pre-release-builds.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<span class="releasedate"><?php echo date('d M Y', strtotime($info['date'])); ?></span>
9999
<?php foreach ($QA_CHECKSUM_TYPES as $algo): ?>
100100
<?php if (isset($file_info[$algo]) && strlen($file_info[$algo])) : ?>
101-
<?php echo checksum_html($file_info[$algo], $algo); ?>
101+
<?php echo sha256_html($file_info[$algo]); ?>
102102
<?php else: ?>
103103
<em><small>No checksum value available</small></em>)&nbsp;
104104
<?php endif; ?>
@@ -188,7 +188,7 @@
188188
}
189189

190190
if ($includeSha && $sha !== '') {
191-
$parts[] = checksum_html($sha);
191+
$parts[] = sha256_html($sha);
192192
}
193193

194194
return '<li>' . implode(' ', $parts) . '</li>';

releases/index.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,8 @@ function mk_rel(int $major,
219219
echo " <li>\n";
220220
if (isset($src['filename'])) {
221221
download_link($src["filename"], $src["name"]); echo "<br>\n";
222-
$linebreak = '';
223-
foreach (['md5', 'sha256'] as $cs) {
224-
if (isset($src[$cs])) {
225-
echo $linebreak, checksum_html($src[$cs], $cs), "\n";
226-
$linebreak = "<br/>";
227-
}
222+
if (isset($src['sha256'])) {
223+
echo sha256_html($src['sha256']), "\n";
228224
}
229225
} else {
230226
echo "<a href=\"{$src['link']}\">{$src['name']}</a>";

styles/theme-base.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -783,17 +783,13 @@ fieldset {
783783
.content-header .changelog {
784784
color:#369;
785785
}
786-
.content-box .md5sum, .content-box .sha256 {
786+
.content-box .sha256,
787+
.downloads .sha256 {
787788
display: block;
788789
font: normal 0.875rem/1.5rem "Fira Mono", "Source Code Pro", monospace;
789790
overflow: hidden;
790791
text-overflow: ellipsis;
791792
}
792-
.content-box .md5sum:before,
793-
.downloads .md5sum:before {
794-
content: "md5: ";
795-
font-family: var(--font-family-sans-serif);
796-
}
797793
.content-box .sha256:before,
798794
.downloads .sha256:before {
799795
content: "sha256: ";

0 commit comments

Comments
 (0)