mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
security: fix all LOW priority items from TODO.SECURITY.md
Item 13 — Remove deprecated X-XSS-Protection header
- nginx/posterg.conf: header removed (was '1; mode=block')
- nginx/SECURITY_HEADERS.md: new file documenting header decisions
and explaining why X-XSS-Protection is counterproductive
Item 14 — Add rel="noreferrer" to external target="_blank" link
- public/admin/thanks.php: rel="noopener" → rel="noopener noreferrer"
Item 15 — Explicit (int) casts on all integer HTML outputs
- public/index.php: (int) on item id, page numbers
- public/search.php: (int) on totalItems, year options, item id, pagination
Item 16 — Remove unused DATABASE_PATH constant
- config/bootstrap.php: define('DATABASE_PATH', ...) removed
docs/TODO.SECURITY.md updated: items 13-16 marked resolved and
moved to the ✅ Resolved section.
This commit is contained in:
@@ -24,7 +24,7 @@ include APP_ROOT . '/includes/header.php';
|
||||
|
||||
<main>
|
||||
<?php foreach ($itemsToLoad as $item): ?>
|
||||
<a href="memoire.php?id=<?= $item["id"] ?>" class="card-link">
|
||||
<a href="memoire.php?id=<?= (int)$item["id"] ?>" class="card-link">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<h2 class="title"><?= htmlspecialchars($item["title"]) ?></h2>
|
||||
@@ -43,14 +43,14 @@ include APP_ROOT . '/includes/header.php';
|
||||
<?php if ($totalPages > 1): ?>
|
||||
<nav class="pagination">
|
||||
<?php if ($page > 1): ?>
|
||||
<a href="?page=<?= $page - 1 ?>" class="pagination-previous">Précédent</a>
|
||||
<a href="?page=<?= (int)($page - 1) ?>" class="pagination-previous">Précédent</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($page < $totalPages): ?>
|
||||
<a href="?page=<?= $page + 1 ?>" class="pagination-next">Suivant</a>
|
||||
<a href="?page=<?= (int)($page + 1) ?>" class="pagination-next">Suivant</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="pagination-info">Page <?= $page ?> sur <?= $totalPages ?></span>
|
||||
<span class="pagination-info">Page <?= (int)$page ?> sur <?= (int)$totalPages ?></span>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user