From ccc9a05b758f1dc0313b96807edfc447a9e8d278 Mon Sep 17 00:00:00 2001 From: polo Date: Thu, 8 Feb 2024 04:31:14 +0100 Subject: RGPD cookie uniquement en mode admin et avertissement, logo journal --- controller/ckeditor.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'controller/ckeditor.php') diff --git a/controller/ckeditor.php b/controller/ckeditor.php index 1707128..d0c5824 100644 --- a/controller/ckeditor.php +++ b/controller/ckeditor.php @@ -18,8 +18,9 @@ function preparationCKeditor($html) header('Location: index.php?erreur=empty_input'); } - // supprimer espaces, tabulations et sauts de ligne en début et fin de chaine - $html = trim($html); + // sécuriser le HTML + require('controller/Security.php'); + $html = Security::secureString($html); // supprimer les sauts de ligne $sautsDeLigne = array("\n", "\r", "\r\n"); @@ -58,7 +59,7 @@ function getFileCodeFromHTTPReferrer(): string function submitCKeditor() { // déjà fait mais on ne sait jamais - if(!isset($_SESSION['admin']) || $_SESSION['admin'] != 1) + if(!isset($_SESSION)) { header('Location: index.php?page=' . $_GET['page'] . '&erreur=connexion'); exit(); -- cgit v1.2.3