From c75da06bb039de2a43f21b6e853a72745f753dca Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Mon, 21 Sep 2009 14:39:30 +0200 Subject: [PATCH] =?utf8?q?MOD=20#138=20:=20Stockage=20des=20passwords=20ha?= =?utf8?q?sh=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- index.php | 2 +- php/controller.php | 4 ++-- php/pages/bienvenue.php | 2 +- php/panel.php | 2 +- php/participant.php | 3 ++- php/update_db.php | 3 ++- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index e41a32e..eb24013 100644 --- a/index.php +++ b/index.php @@ -28,7 +28,7 @@ $panel = new Panel($participant); if ($controller->nouvel_inscrit) $page = "bienvenue"; - + echo ''; ?> diff --git a/php/controller.php b/php/controller.php index f3fd468..cad4352 100644 --- a/php/controller.php +++ b/php/controller.php @@ -48,7 +48,7 @@ class Controller array( $id, $_POST['pseudo'], - $_POST['pass1'], + sha1($_POST['pass1']), $_POST['clan_nom'], $_POST['clan_tag'], $_POST['nom'], @@ -78,7 +78,7 @@ class Controller { pg_query("BEGIN"); pg_query_params("UPDATE participants SET pseudo = $1 WHERE id = $2", array($_POST['pseudo'], $this->participant->info->id)); - pg_query_params("UPDATE participants SET password = $1 WHERE id = $2", array($_POST['pass1'], $this->participant->info->id)); + pg_query_params("UPDATE participants SET password = $1 WHERE id = $2", array(sha1($_POST['pass1']), $this->participant->info->id)); pg_query_params("UPDATE participants SET clan_nom = $1 WHERE id = $2", array($_POST['clan_nom'], $this->participant->info->id)); pg_query_params("UPDATE participants SET clan_tag = $1 WHERE id = $2", array($_POST['clan_tag'], $this->participant->info->id)); pg_query_params("UPDATE participants SET nom = $1 WHERE id = $2", array($_POST['nom'], $this->participant->info->id)); diff --git a/php/pages/bienvenue.php b/php/pages/bienvenue.php index b808985..7e14f00 100644 --- a/php/pages/bienvenue.php +++ b/php/pages/bienvenue.php @@ -1,7 +1,7 @@

Toute l'équipe de la Corcelles-LAN vous souhaite la bienvenue !!

-

Votre inscription a été enregistré, voici quelques liens utiles : +

Votre inscription a été enregistrée, voici quelques liens utiles :