diff options
author | pjmattal <pjmattal> | 2005-01-23 22:47:35 +0100 |
---|---|---|
committer | pjmattal <pjmattal> | 2005-01-23 22:47:35 +0100 |
commit | 94e2a43574f6e85cd70063391147adc9f9f70504 (patch) | |
tree | ce78df4713b0079366631f43b96f3393fa5e663e /tupkg/server | |
parent | ea510399705eaf88a8cd3a07f49d33d7c7cc2b29 (diff) | |
download | aur-94e2a43574f6e85cd70063391147adc9f9f70504.tar.gz aur-94e2a43574f6e85cd70063391147adc9f9f70504.tar.xz |
updated tupkgs to work with md5 passwords
Diffstat (limited to 'tupkg/server')
-rwxr-xr-x | tupkg/server/tupkgs | 5 |
1 files changed, 4 insertions, 1 deletions
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") |