From fca572ea535040e640f04800b0825c82ff88a3a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Wed, 18 Dec 2019 16:57:52 +0100
Subject: [PATCH] :sparkles: feat(2fa) Enable recovery code and fix form submit

issue #6059
---
 ihtml/themes/breezy/secondfactor.tpl | 1 +
 include/login/class_LoginPost.inc    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ihtml/themes/breezy/secondfactor.tpl b/ihtml/themes/breezy/secondfactor.tpl
index 2c3111914..904fc9ec6 100644
--- a/ihtml/themes/breezy/secondfactor.tpl
+++ b/ihtml/themes/breezy/secondfactor.tpl
@@ -8,6 +8,7 @@
 
 <div id="window-div">
 <form action="" method="post" id="loginform" name="loginform">
+  <div style="width: 0; height: 0; overflow: hidden;"><input type="submit" name="default_submit_hidden_button"/></div>
 
 {$msg_dialogs}
   <div id="window-titlebar">
diff --git a/include/login/class_LoginPost.inc b/include/login/class_LoginPost.inc
index 1359a4245..ab35b6a61 100644
--- a/include/login/class_LoginPost.inc
+++ b/include/login/class_LoginPost.inc
@@ -24,7 +24,7 @@
 class LoginPost extends LoginMethod
 {
   /*! \brief List of second factor methods, may be dynamic later */
-  static $secondFactorMethods = ['SecondFactorWebAuthn','SecondFactorTotp'];
+  static $secondFactorMethods = ['SecondFactorWebAuthn','SecondFactorTotp','SecondFactorRecoveryCode'];
 
   /*! \brief Displayed name */
   static function getLabel ()
-- 
GitLab