mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
updated tupkgs to work with md5 passwords
This commit is contained in:
parent
ea51039970
commit
94e2a43574
1 changed files with 4 additions and 1 deletions
|
@ -115,10 +115,13 @@ class ClientSocket(threading.Thread):
|
||||||
authdata = self.readMsg(1)
|
authdata = self.readMsg(1)
|
||||||
print authdata
|
print authdata
|
||||||
q = self.db.cursor()
|
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 = '"+
|
q.execute("SELECT ID, Suspended, AccountTypeID FROM Users WHERE Username = '"+
|
||||||
MySQLdb.escape_string(authdata['username'][0])+
|
MySQLdb.escape_string(authdata['username'][0])+
|
||||||
"' AND Passwd = '"+
|
"' AND Passwd = '"+
|
||||||
MySQLdb.escape_string(authdata['password'][0])+
|
MySQLdb.escape_string(encpw)+
|
||||||
"'")
|
"'")
|
||||||
if q.rowcount == 0:
|
if q.rowcount == 0:
|
||||||
self.sendMsg("result=FAIL")
|
self.sendMsg("result=FAIL")
|
||||||
|
|
Loading…
Add table
Reference in a new issue