From: Greg Burri Date: Mon, 21 Sep 2009 12:39:30 +0000 (+0200) Subject: MOD #138 : Stockage des passwords hashés X-Git-Url: http://git.euphorik.ch/?p=cl7.git;a=commitdiff_plain;h=c75da06bb039de2a43f21b6e853a72745f753dca MOD #138 : Stockage des passwords hashés --- 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 :