From 21a75c1fd1f525d6b6dd6265e703d49f360b221e Mon Sep 17 00:00:00 2001 From: andryyy Date: Mon, 16 Nov 2020 08:55:45 +0100 Subject: [PATCH] [Web] FIDO2: Print thrown error in verification failure, if any --- data/web/inc/footer.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/web/inc/footer.inc.php b/data/web/inc/footer.inc.php index b65b0846..8738cc64 100644 --- a/data/web/inc/footer.inc.php +++ b/data/web/inc/footer.inc.php @@ -167,7 +167,11 @@ $(document).ready(function() { throw new Error(); } }).catch(function(err) { - mailcow_alert_box(lang_fido2.fido2_validation_failed, "danger"); + if (typeof err.message === 'undefined') { + mailcow_alert_box(lang_fido2.fido2_validation_failed, "danger"); + } else { + mailcow_alert_box(lang_fido2.fido2_validation_failed + ":
" + err.message + "", "danger"); + } }); }); // Set TFA/FIDO2