| | $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>'; |