add input validation and security headers to all pages
This commit is contained in:
+7
-2
@@ -2,8 +2,12 @@
|
||||
// Inclure la configuration
|
||||
require_once 'includes/config.php';
|
||||
|
||||
// Récupération de l'ID de catégorie
|
||||
$categoryId = isset($_GET['id']) ? intval($_GET['id']) : null;
|
||||
// Appliquer les en-têtes de sécurité
|
||||
setSecurityHeaders();
|
||||
|
||||
// Récupération et validation de l'ID de catégorie
|
||||
$categoryId = isset($_GET['id']) ? $_GET['id'] : null;
|
||||
$categoryId = $categoryId ? validateCategoryId($categoryId) : null;
|
||||
|
||||
// Récupérer les catégories disponibles
|
||||
$allCategories = PEERTUBE_CATEGORIES;
|
||||
@@ -27,6 +31,7 @@ if ($categoryId && isset($allCategories[$categoryId])) {
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="csrf-token" content="<?php echo generateCSRFToken(); ?>">
|
||||
<title><?php echo htmlspecialchars($categoryName); ?> - kaubuntu.re</title>
|
||||
<link rel="stylesheet" href="css/styles.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
|
||||
Reference in New Issue
Block a user