summaryrefslogtreecommitdiffstats
path: root/tupkg/server
diff options
context:
space:
mode:
authorpjmattal <pjmattal>2005-01-23 21:47:35 +0000
committerpjmattal <pjmattal>2005-01-23 21:47:35 +0000
commit94e2a43574f6e85cd70063391147adc9f9f70504 (patch)
treece78df4713b0079366631f43b96f3393fa5e663e /tupkg/server
parentea510399705eaf88a8cd3a07f49d33d7c7cc2b29 (diff)
downloadaurweb-94e2a43574f6e85cd70063391147adc9f9f70504.tar.xz
updated tupkgs to work with md5 passwords
Diffstat (limited to 'tupkg/server')
-rwxr-xr-xtupkg/server/tupkgs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tupkg/server/tupkgs b/tupkg/server/tupkgs
index 0db7aab..691ab12 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")