summaryrefslogtreecommitdiff
path: root/controller/Security.php
diff options
context:
space:
mode:
Diffstat (limited to 'controller/Security.php')
-rw-r--r--controller/Security.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/controller/Security.php b/controller/Security.php
index c53cdc6..15c44b2 100644
--- a/controller/Security.php
+++ b/controller/Security.php
@@ -1,9 +1,6 @@
1<?php 1<?php
2// controller/Security.php 2// controller/Security.php
3 3
4// sécurité faille XSS avec htmLawed
5require('lib/htmlawed/htmLawed.php');
6
7class Security 4class Security
8{ 5{
9 private static $configHtmLawed = array( 6 private static $configHtmLawed = array(
@@ -16,6 +13,9 @@ class Security
16 13
17 public static function secureString(string $chaine): string 14 public static function secureString(string $chaine): string
18 { 15 {
16 // sécurité faille XSS avec htmLawed
17 require('lib/htmlawed/htmLawed.php');
18
19 $chaine = htmLawed($chaine, self::$configHtmLawed, self::$specHtmLawed); 19 $chaine = htmLawed($chaine, self::$configHtmLawed, self::$specHtmLawed);
20 $chaine = trim($chaine); // supprimer espaces, tabulations et sauts de ligne en début et fin de chaine (pour l'entrée de l'éditeur) 20 $chaine = trim($chaine); // supprimer espaces, tabulations et sauts de ligne en début et fin de chaine (pour l'entrée de l'éditeur)
21 return $chaine; 21 return $chaine;