fix(security): safe JSON-LD encoding and URL escaping
This commit is contained in:
+6
-4
@@ -3,6 +3,8 @@
|
||||
require_once 'includes/config.php';
|
||||
// Inclure les fonctions de sécurité
|
||||
require_once 'includes/security.php';
|
||||
// Inclure les fonctions de données structurées (getBaseUrl, getCurrentUrl)
|
||||
require_once 'includes/structured-data.php';
|
||||
// Appliquer les en-têtes de sécurité
|
||||
setSecurityHeaders();
|
||||
?>
|
||||
@@ -14,7 +16,7 @@ setSecurityHeaders();
|
||||
<meta name="csrf-token" content="<?php echo generateCSRFToken(); ?>">
|
||||
<title><?php echo SITE_NAME; ?> - Ouverture prochaine</title>
|
||||
<meta name="description" content="<?php echo htmlspecialchars(SITE_DESCRIPTION); ?> Ouverture prochaine.">
|
||||
<link rel="canonical" href="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/countdown.php'; ?>">
|
||||
<link rel="canonical" href="<?php echo getBaseUrl() . '/countdown.php'; ?>">
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" href="css/countdown.css?v=<?php echo filemtime('css/countdown.css'); ?>">
|
||||
@@ -42,8 +44,8 @@ setSecurityHeaders();
|
||||
setlocale(LC_TIME, 'fr_FR.UTF-8');
|
||||
echo strftime('%e %B %Y', $targetDate->getTimestamp());
|
||||
?>. Restez connectés !">
|
||||
<meta property="og:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>">
|
||||
<meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>">
|
||||
<meta property="og:image" content="<?php echo getBaseUrl() . '/img/logo.png'; ?>">
|
||||
<meta property="og:url" content="<?php echo htmlspecialchars(getCurrentUrl()); ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="<?php echo SITE_NAME; ?>">
|
||||
<meta property="og:locale" content="fr_FR">
|
||||
@@ -56,7 +58,7 @@ setSecurityHeaders();
|
||||
setlocale(LC_TIME, 'fr_FR.UTF-8');
|
||||
echo strftime('%e %B %Y', $targetDate->getTimestamp());
|
||||
?>. Restez connectés !">
|
||||
<meta name="twitter:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>">
|
||||
<meta name="twitter:image" content="<?php echo getBaseUrl() . '/img/logo.png'; ?>">
|
||||
|
||||
<!-- Configuration JavaScript -->
|
||||
<script nonce="<?php echo getCspNonce(); ?>">
|
||||
|
||||
Reference in New Issue
Block a user