Ticket #2885: session_store_commit.patch
| File session_store_commit.patch, 0.9 kB (added by pacopablo, 9 months ago) |
|---|
-
db.py
old new 55 55 "WHERE authenticated=1 AND name='password' " 56 56 "AND sid=%s", (hash, user)) 57 57 if cursor.rowcount > 0: 58 db.commit() 58 59 return False # updated existing password 59 60 cursor.execute("INSERT INTO session_attribute " 60 61 "(sid,authenticated,name,value) " 61 62 "VALUES (%s,1,'password',%s)", 62 63 (user, hash)) 64 db.commit() 63 65 return True 64 66 65 67 def check_password(self, user, password): … … 87 89 "AND sid=%s", (user,)) 88 90 # TODO cursor.rowcount doesn't seem to get # deleted 89 91 # is there another way to get count instead of using has_user? 92 db.commit() 90 93 return True
