mirror of
https://github.com/simple-login/app.git
synced 2024-09-30 05:31:30 +02:00
Do not show full error msg to user
This commit is contained in:
parent
282cbe25a3
commit
0052dad13e
@ -67,7 +67,8 @@ def fido():
|
|||||||
new_sign_count = webauthn_assertion_response.verify()
|
new_sign_count = webauthn_assertion_response.verify()
|
||||||
is_webauthn_verified = True
|
is_webauthn_verified = True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
flash('Key verification failed. Error: {}'.format(e), "warning")
|
LOG.error(f'An error occurred in WebAuthn verification process: {e}')
|
||||||
|
flash('Key verification failed.', "warning")
|
||||||
|
|
||||||
if is_webauthn_verified:
|
if is_webauthn_verified:
|
||||||
user.fido_sign_count = new_sign_count
|
user.fido_sign_count = new_sign_count
|
||||||
|
@ -50,7 +50,8 @@ def fido_setup():
|
|||||||
try:
|
try:
|
||||||
fido_credential = fido_reg_response.verify()
|
fido_credential = fido_reg_response.verify()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
flash('Key registration failed. Error: {}'.format(e), "warning")
|
LOG.error(f'An error occurred in WebAuthn registration process: {e}')
|
||||||
|
flash('Key registration failed.', "warning")
|
||||||
return redirect(url_for("dashboard.index"))
|
return redirect(url_for("dashboard.index"))
|
||||||
|
|
||||||
current_user.fido_pk = str(fido_credential.public_key, "utf-8")
|
current_user.fido_pk = str(fido_credential.public_key, "utf-8")
|
||||||
|
Loading…
Reference in New Issue
Block a user