mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-31 21:17:23 +02:00
Exclude mru_token in user key hash
This commit is contained in:
@@ -22,11 +22,17 @@ def get_mfa_state(email, env):
|
||||
]
|
||||
|
||||
def get_public_mfa_state(email, env):
|
||||
c = open_database(env)
|
||||
c.execute('SELECT id, type, label FROM mfa WHERE user_id=?', (get_user_id(email, c),))
|
||||
mfa_state = get_mfa_state(email, env)
|
||||
return [
|
||||
{ "id": r[0], "type": r[1], "label": r[2] }
|
||||
for r in c.fetchall()
|
||||
{ "id": s["id"], "type": s["type"], "label": s["label"] }
|
||||
for s in mfa_state
|
||||
]
|
||||
|
||||
def get_hash_mfa_state(email, env):
|
||||
mfa_state = get_mfa_state(email, env)
|
||||
return [
|
||||
{ "id": s["id"], "type": s["type"], "secret": s["secret"] }
|
||||
for s in mfa_state
|
||||
]
|
||||
|
||||
def enable_mfa(email, type, secret, token, label, env):
|
||||
|
||||
Reference in New Issue
Block a user