Skip to content
Snippets Groups Projects
Commit 9860e99b authored by Marco De Donno's avatar Marco De Donno
Browse files

Patch the vaildation of new users for admin with a security key not used

Only get the last used security key to validate new users
parent 082421ca
No related branches found
No related tags found
No related merge requests found
......@@ -782,7 +782,7 @@ def do_validate_signin():
user_id = session[ 'user_id' ]
q = config.db.query( "SELECT * FROM webauthn WHERE user_id = %s ORDER BY last_usage DESC LIMIT 1", ( user_id, ) )
q = config.db.query( "SELECT * FROM webauthn WHERE user_id = %s AND usage_counter > 0 ORDER BY last_usage DESC LIMIT 1", ( user_id, ) )
key = q.fetchone()
webauthn_user = webauthn.WebAuthnUser(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment