From b25c7c69638c0957c19872325c8394abea892cca Mon Sep 17 00:00:00 2001 From: Axel ROGER Date: Wed, 7 Nov 2012 10:28:40 +0000 Subject: [PATCH] Ask to confirm password when updating it (Awstats users) --- awstats/bureau/admin/aws_pass.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/awstats/bureau/admin/aws_pass.php b/awstats/bureau/admin/aws_pass.php index c360e83c..02e202d6 100644 --- a/awstats/bureau/admin/aws_pass.php +++ b/awstats/bureau/admin/aws_pass.php @@ -27,6 +27,7 @@ require_once("../class/config.php"); $fields = array ( "login" => array ("request", "string", ""), "pass" => array ("request", "string", ""), + "passconf" => array ("request", "string", ""), ); getFields($fields); @@ -38,12 +39,19 @@ if (!$aws->login_exists($login)) { } if ($pass) { + if ($pass != $passconf) { + $error = _("Passwords do not match"); + include("aws_users.php"); + exit(); + }else{ if (!$aws->change_pass($login,$pass)) { $error=$err->errstr(); } else { + $error = _("Password successfuly updated"); include("aws_users.php"); exit(); } + } } include_once("head.php"); @@ -63,6 +71,7 @@ if (isset($error) && $error) { + " /> " onclick="document.location='aws_users.php'"/>