From 94e2a43574f6e85cd70063391147adc9f9f70504 Mon Sep 17 00:00:00 2001 From: pjmattal Date: Sun, 23 Jan 2005 21:47:35 +0000 Subject: updated tupkgs to work with md5 passwords --- tupkg/server/tupkgs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tupkg/server/tupkgs b/tupkg/server/tupkgs index 0db7aabd..691ab123 100755 --- a/tupkg/server/tupkgs +++ b/tupkg/server/tupkgs @@ -115,10 +115,13 @@ class ClientSocket(threading.Thread): authdata = self.readMsg(1) print authdata q = self.db.cursor() + m = md5.new() + m.update(authdata['password'][0]) + encpw = m.hexdigest() q.execute("SELECT ID, Suspended, AccountTypeID FROM Users WHERE Username = '"+ MySQLdb.escape_string(authdata['username'][0])+ "' AND Passwd = '"+ - MySQLdb.escape_string(authdata['password'][0])+ + MySQLdb.escape_string(encpw)+ "'") if q.rowcount == 0: self.sendMsg("result=FAIL") -- cgit v1.2.3-24-g4f1b