From e69b67f90b83809c607c53612dbe3223ae27b625 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 9 May 2010 23:56:39 +0100 Subject: [PATCH] Fixed password reset, now sets cert --- sso/services/qms/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sso/services/qms/__init__.py b/sso/services/qms/__init__.py index a7f4be9..9cf1ce3 100644 --- a/sso/services/qms/__init__.py +++ b/sso/services/qms/__init__.py @@ -16,7 +16,7 @@ class QMSService(BaseService): SQL_ADD_USER = r"INSERT INTO users (ssoid, Name, passhash, salt, Email, certificate) VALUES (%s, %s, %s, %s, %s, %s)" SQL_DIS_USER = r"UPDATE users SET passhash = '' WHERE ssoid = %s" - SQL_ENABLE_USER = r"UPDATE users SET passhash = %s, salt = %s WHERE ssoid = %s" + SQL_ENABLE_USER = r"UPDATE users SET passhash = %s, salt = %s, certificate = %s WHERE ssoid = %s" SQL_CHECK_USER = r"SELECT ssoid from users WHERE ssoid = %s" def __init__(self): @@ -79,8 +79,8 @@ class QMSService(BaseService): def enable_user(self, uid, password): """ Enable a user """ - pwhash, salt = self._gen_pwhash(password) - self._dbcursor.execute(self.SQL_ENABLE_USER, [pwhash, salt, uid]) + pwhash, salt, cert = self._gen_pwhash(password) + self._dbcursor.execute(self.SQL_ENABLE_USER, [pwhash, salt, cert, uid]) self._db.connection.commit() return True