aboutsummaryrefslogtreecommitdiff
path: root/systems/eldiron/websites
diff options
context:
space:
mode:
Diffstat (limited to 'systems/eldiron/websites')
-rw-r--r--systems/eldiron/websites/tools/landing/ldap_password.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/systems/eldiron/websites/tools/landing/ldap_password.php b/systems/eldiron/websites/tools/landing/ldap_password.php
index efb4f57..b3b2f15 100644
--- a/systems/eldiron/websites/tools/landing/ldap_password.php
+++ b/systems/eldiron/websites/tools/landing/ldap_password.php
@@ -45,7 +45,7 @@ function changePasswordSQL($user_realm, $newPassword) {
45 } 45 }
46 } 46 }
47 $con = pg_connect(""); 47 $con = pg_connect("");
48 $result = pg_query_params($con, "WITH newsalt as (SELECT gen_random_bytes(4)) UPDATE ldap_users SET password = encode(digest( $1 || (SELECT * FROM newsalt), 'sha1'), 'hex'), mechanism = 'SSHA', salt = (SELECT * FROM newsalt) where login || '@' || realm = $2", array($newPassword, $user_realm)); 48 $result = pg_query_params($con, "WITH newsalt as (SELECT gen_random_bytes(4)) UPDATE ldap_users SET password = encode(digest( convert_to($1, 'UTF8') || (SELECT * FROM newsalt), 'sha1'), 'hex'), mechanism = 'SSHA', salt = (SELECT * FROM newsalt) where login || '@' || realm = $2", array($newPassword, $user_realm));
49 if (!$result) { 49 if (!$result) {
50 $message[] = "Error when accessing database"; 50 $message[] = "Error when accessing database";
51 return false; 51 return false;