From 7438923629f9e050666c75ccfa34ea072ee3296c Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 19 Feb 2016 06:44:05 -0500
Subject: [PATCH] - use password crypting function of auth module in client edit (Fixes #3147)
---
interface/web/client/client_edit.php | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index d9afd57..219fdfa 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -408,13 +408,7 @@
// password changed
if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
$password = $this->dataRecord["password"];
- $salt="$1$";
- $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
- for ($n=0;$n<8;$n++) {
- $salt.=$base64_alphabet[mt_rand(0, 63)];
- }
- $salt.="$";
- $password = crypt(stripslashes($password), $salt);
+ $password = $app->auth->crypt_password($password);
$client_id = $this->id;
$sql = "UPDATE sys_user SET passwort = ? WHERE client_id = ?";
$app->db->query($sql, $password, $client_id);
--
Gitblit v1.9.1