summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorjchu <jchu>2005-01-21 15:50:25 +0100
committerjchu <jchu>2005-01-21 15:50:25 +0100
commit28e23308d4e15c8883b8c36b24e4395487004d95 (patch)
tree892449d3e5e125f5fc27bab2d534856a5a83de23 /web/lib
parent91c3f94ff9df319b548cd332566198b72f8124cd (diff)
downloadaur-28e23308d4e15c8883b8c36b24e4395487004d95.tar.gz
aur-28e23308d4e15c8883b8c36b24e4395487004d95.tar.xz
added hashed passwords
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/acctfuncs.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc
index d27b96f4..e56ceebc 100644
--- a/web/lib/acctfuncs.inc
+++ b/web/lib/acctfuncs.inc
@@ -245,6 +245,9 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="",
if ($TYPE == "new") {
# no errors, go ahead and create the unprivileged user
#
+
+ #md5hash the password
+ $P = md5($P);
$q = "INSERT INTO Users (AccountTypeID, Suspended, Username, Email, ";
$q.= "Passwd, RealName, LangPreference, IRCNick, NewPkgNotify) ";
$q.= "VALUES (1, 0, '".mysql_escape_string($U)."'";
@@ -275,6 +278,9 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="",
} else {
# no errors, go ahead and modify the user account
#
+
+ #md5 hash the password
+ $P = md5($P);
$q = "UPDATE Users SET ";
$q.= "Username = '".mysql_escape_string($U)."'";
if ($T) {