summaryrefslogtreecommitdiffstats
path: root/changepassword.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'changepassword.cgi')
-rwxr-xr-xchangepassword.cgi6
1 files changed, 5 insertions, 1 deletions
diff --git a/changepassword.cgi b/changepassword.cgi
index 2e0a4f06a..9e031bb16 100755
--- a/changepassword.cgi
+++ b/changepassword.cgi
@@ -66,7 +66,11 @@ Please click <b>Back</b> and try again."
puts "Content-type: text/html\n"
-SendSQL "update profiles set password='$pwd' where login_name='[SqlQuote $COOKIE(Bugzilla_login)]'"
+SendSQL "select encrypt('$pwd')"
+set encrypted [lindex [FetchSQLData] 0]
+
+SendSQL "update profiles set password='$pwd',cryptpassword='$encrypted' where login_name='[SqlQuote $COOKIE(Bugzilla_login)]'"
+SendSQL "update logincookies set cryptpassword = '$encrypted' where cookie = $COOKIE(Bugzilla_logincookie)"
puts "<H1>OK, done.</H1>
Your new password has been set.