From 126a49185229f248eae8c485b3e16e029ebcb353 Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 23 Oct 2026 23:29:59 +0200 Subject: =?UTF-8?q?audit=20claude=20code=201,=20validation=20formulaire=20?= =?UTF-8?q?toujours=20ok,=20=C3=A9chappement=20dans=20URL,=20quelques=20ht?= =?UTF-8?q?mlspecialchars=20manquants,=20fonction=20Security::validateURL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/ViewController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Controller/ViewController.php') diff --git a/src/Controller/ViewController.php b/src/Controller/ViewController.php index 1f13861..5be4ffd 100644 --- a/src/Controller/ViewController.php +++ b/src/Controller/ViewController.php @@ -38,7 +38,8 @@ class ViewController{ else{ // mode création d'article // l'id du bloc et 'from=' sont vérifiés dans ArticleController::editorSubmit - if($request->query->get('id')[0] === 'n' && $request->query->has('from') && !empty($request->query->get('from'))){ + if(preg_match('/^n\d+\z/', $request->query->get('id')) // débute par 'n' puis des chiffres, \z au lieu de $ pour éviter un saut de ligne à la fin + && $request->query->has('from') && !empty($request->query->get('from'))){ NewBuilder::$new_article_mode = true; } } -- cgit v1.2.3