summaryrefslogtreecommitdiffstats
path: root/git-interface
diff options
context:
space:
mode:
Diffstat (limited to 'git-interface')
-rwxr-xr-xgit-interface/git-auth.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-interface/git-auth.py b/git-interface/git-auth.py
index b67d9de..c7de777 100755
--- a/git-interface/git-auth.py
+++ b/git-interface/git-auth.py
@@ -47,8 +47,10 @@ db = mysql.connector.connect(host=aur_db_host, user=aur_db_user,
unix_socket=aur_db_socket, buffered=True)
cur = db.cursor()
-cur.execute("SELECT Username, AccountTypeID FROM Users WHERE SSHPubKey = %s " +
- "AND Suspended = 0", (keytype + " " + keytext,))
+cur.execute("SELECT Users.Username, Users.AccountTypeID FROM Users " +
+ "INNER JOIN SSHPubKeys ON SSHPubKeys.UserID = Users.ID "
+ "WHERE SSHPubKeys.PubKey = %s AND Users.Suspended = 0",
+ (keytype + " " + keytext,))
if cur.rowcount != 1:
exit(1)