From 794f4094c9b893d0a33ff7224ba79c3733450186 Mon Sep 17 00:00:00 2001 From: Florian Sylvain Date: Sun, 31 Oct 2021 00:16:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20Sanitization=20of=20aut?= =?UTF-8?q?hor=20name=20to=20prevent=20errors=20caused=20by=20quotes=20and?= =?UTF-8?q?=20double=20quotes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjetProgWeb/class/conf.php | 2 +- ProjetProgWeb/index.php | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ProjetProgWeb/class/conf.php b/ProjetProgWeb/class/conf.php index d6ad5da..c9795d9 100644 --- a/ProjetProgWeb/class/conf.php +++ b/ProjetProgWeb/class/conf.php @@ -8,6 +8,6 @@ class conf private pdo $pdo; public function getPDO() : pdo { - return new PDO('mysql:host=localhost;dbname=' . getenv('DBNAME'), getenv('USERNAME'), getenv('PASSWORD')); + return new PDO('mysql:host=localhost;charset=UTF8;dbname=' . getenv('DBNAME'), getenv('USERNAME'), getenv('PASSWORD')); } } \ No newline at end of file diff --git a/ProjetProgWeb/index.php b/ProjetProgWeb/index.php index 82eb2b3..ee46469 100644 --- a/ProjetProgWeb/index.php +++ b/ProjetProgWeb/index.php @@ -5,20 +5,12 @@ - Document Veuillez entrer 3 caractères minimum.

"; - } else { - echo ""; - } - } ?>