summaryrefslogtreecommitdiff
path: root/src/Security.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-08-11 06:25:39 +0200
committerpolo <ordipolo@gmx.fr>2025-08-11 06:25:39 +0200
commitd7468fc363b5d028db84373d4abfa6d7d19bacb9 (patch)
tree0235e6c7520bb16b939f3e753ccd45c94bfaef28 /src/Security.php
parent90673ef19133e037cf401773f4262ba3d7d050bf (diff)
downloadcms-d7468fc363b5d028db84373d4abfa6d7d19bacb9.zip
nouveau routeur! et contrôleurs et vues pour la connexion et la gestion du compte, début d'utilisation de Request et Responsemain
Diffstat (limited to 'src/Security.php')
-rw-r--r--src/Security.php11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/Security.php b/src/Security.php
index b2042fd..c825994 100644
--- a/src/Security.php
+++ b/src/Security.php
@@ -19,8 +19,8 @@ class Security
19 // faire qu'un certain élément puisse n'avoir que certains attributs, regarder la doc 19 // faire qu'un certain élément puisse n'avoir que certains attributs, regarder la doc
20 private static $specHtmLawed = ''; 20 private static $specHtmLawed = '';
21 21
22 // ATTENTION, n'applique pas htmlspecialchars() !! 22 // obtenir du HTML non dangereur sans appliquer htmlspecialchars
23 public static function secureString(string $chaine): string 23 public static function secureHTML(string $chaine): string
24 { 24 {
25 return trim(htmLawed($chaine, self::$configHtmLawed, self::$specHtmLawed)); 25 return trim(htmLawed($chaine, self::$configHtmLawed, self::$specHtmLawed));
26 } 26 }
@@ -80,13 +80,6 @@ class Security
80 } 80 }
81} 81}
82 82
83// erreurs à la création des mots de passe
84function removeSpacesTabsCRLF(string $chaine): string
85{
86 $cibles = [' ', "\t", "\n", "\r"]; // doubles quotes !!
87 return(str_replace($cibles, '', $chaine));
88}
89
90// lien sans http:// 83// lien sans http://
91function fixLinks($data) 84function fixLinks($data)
92{ 85{