Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Redacts email, fixes parent link

AuthorDave Jarvis <email>
Date2026-02-09 23:36:45 GMT-0800
Commitd51c62da46cd20948aac05b6b0a064d87059ad9f
Parente2e647a
DiffPage.php
$this->renderBreadcrumbs();
+ // Fix 1: Redact email address
+ $author = $headers['author'] ?? 'Unknown';
+ $author = preg_replace('/<[^>]+>/', '<email>', $author);
+
echo '<div class="commit-details">';
echo '<div class="commit-header">';
echo '<h1 class="commit-title">' . htmlspecialchars(trim($msg)) . '</h1>';
echo '<div class="commit-info">';
- echo '<div class="commit-info-row"><span class="commit-info-label">Author</span><span class="commit-author">' . htmlspecialchars($headers['author'] ?? 'Unknown') . '</span></div>';
+ echo '<div class="commit-info-row"><span class="commit-info-label">Author</span><span class="commit-author">' . htmlspecialchars($author) . '</span></div>';
echo '<div class="commit-info-row"><span class="commit-info-label">Commit</span><span class="commit-info-value">' . $this->hash . '</span></div>';
+
if (isset($headers['parent'])) {
- $repoUrl = '?repo=' . urlencode($this->currentRepo['safe_name']);
+ // Fix 2: Use '&' instead of '?' because parameters (action & hash) already exist
+ $repoUrl = '&repo=' . urlencode($this->currentRepo['safe_name']);
echo '<div class="commit-info-row"><span class="commit-info-label">Parent</span><span class="commit-info-value">';
echo '<a href="?action=commit&hash=' . $headers['parent'] . $repoUrl . '" class="parent-link">' . substr($headers['parent'], 0, 7) . '</a>';
Delta8 lines added, 2 lines removed, 6-line increase