diff options
author | polo <ordipolo@gmx.fr> | 2025-08-11 06:25:39 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2025-08-11 06:25:39 +0200 |
commit | d7468fc363b5d028db84373d4abfa6d7d19bacb9 (patch) | |
tree | 0235e6c7520bb16b939f3e753ccd45c94bfaef28 /src/Security.php | |
parent | 90673ef19133e037cf401773f4262ba3d7d050bf (diff) | |
download | cms-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.php | 11 |
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 | ||
84 | function 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:// |
91 | function fixLinks($data) | 84 | function fixLinks($data) |
92 | { | 85 | { |