mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-22 07:17:05 +00:00
conn.close() if mru_token update can't .commit()
This commit is contained in:
parent
08ae3d2b7f
commit
b0df35eba0
@ -576,7 +576,9 @@ def set_mru_totp_code(email, token, env):
|
||||
c.execute('UPDATE totp_credentials SET mru_token=? WHERE user_email=?', (token, email))
|
||||
|
||||
if c.rowcount != 1:
|
||||
conn.close()
|
||||
raise ValueError("That's not a user (%s)." % email)
|
||||
|
||||
conn.commit()
|
||||
return "OK"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user