summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimo <simo>2005-06-17 03:31:38 +0200
committersimo <simo>2005-06-17 03:31:38 +0200
commit09517611f6fef2b37e02f921e2a06ae492afa034 (patch)
tree8e4e0eace10fcb4c123b9ec2c3d111d1b9fef601
parentb93010dd8360134a55b4d3fe699ff36df9e1eec4 (diff)
downloadaur-09517611f6fef2b37e02f921e2a06ae492afa034.tar.gz
aur-09517611f6fef2b37e02f921e2a06ae492afa034.tar.xz
Fix tupkg server crash when empty password
-rwxr-xr-xtupkg/server/tupkgs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tupkg/server/tupkgs b/tupkg/server/tupkgs
index 77aef568..ca9ab26d 100755
--- a/tupkg/server/tupkgs
+++ b/tupkg/server/tupkgs
@@ -112,6 +112,9 @@ class ClientSocket(threading.Thread):
def auth(self):
authdata = self.readMsg(1)
print authdata
+ if (not authdata.has_key('username')) or (not authdata.has_key('password')):
+ self.sendMsg("result=FAIL")
+ return 0
q = self.db.cursor()
m = md5.new()
m.update(authdata['password'][0])