From 3bd8842171a435d6da5e7e934fa369b3c6510d24 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Tue, 19 Sep 2023 18:21:57 -0400 Subject: [PATCH] Add 2FA code for Login/Password sharing --- guest_view_item.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/guest_view_item.php b/guest_view_item.php index 6705ba14..a4151794 100644 --- a/guest_view_item.php +++ b/guest_view_item.php @@ -140,6 +140,7 @@ if ($item_type == "Document") { exit(); } + $login_id = intval($login_row['login_id']); $login_name = nullable_htmlentities($login_row['login_name']); $login_uri = nullable_htmlentities($login_row['login_uri']); @@ -152,8 +153,19 @@ if ($item_type == "Document") { $login_password = nullable_htmlentities(openssl_decrypt($password_ciphertext, 'aes-128-cbc', $encryption_key, 0, $password_iv)); $login_otp = nullable_htmlentities($login_row['login_otp_secret']); + + $login_otp_secret = nullable_htmlentities($login_row['login_otp_secret']); + $login_id_with_secret = '"' . $login_row['login_id'] . '","' . $login_row['login_otp_secret'] . '"'; + if (empty($login_otp_secret)) { + $otp_display = "-"; + } else { + $otp_display = " Hover.."; + } + $login_notes = nullable_htmlentities($login_row['login_note']); + + ?>

@@ -170,8 +182,36 @@ if ($item_type == "Document") { Password + + + 2FA (TOTP) + + + + + +