Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.2] Add captive prompts for the rest of MFA methods #2506

Closed
jgerman-bot opened this issue Jun 19, 2022 · 0 comments · Fixed by #2483
Closed

[4.2] Add captive prompts for the rest of MFA methods #2506

jgerman-bot opened this issue Jun 19, 2022 · 0 comments · Fixed by #2483

Comments

@jgerman-bot
Copy link

New language relevant PR in upstream repo: joomla/joomla-cms#38082 Here are the upstream changes:

Click to expand the diff!
diff --git a/administrator/components/com_users/src/Model/CaptiveModel.php b/administrator/components/com_users/src/Model/CaptiveModel.php
index b4fc175a72de..f61f47f3aa51 100644
--- a/administrator/components/com_users/src/Model/CaptiveModel.php
+++ b/administrator/components/com_users/src/Model/CaptiveModel.php
@@ -240,6 +240,7 @@ public function loadCaptiveRenderOptions(?MfaTable $record): CaptiveRenderOption
 			{
 				return $renderOptions->merge(
 					[
+						'pre_message' => Text::_('COM_USERS_USER_BACKUPCODES_CAPTIVE_PROMPT'),
 						'input_type' => 'number',
 						'label' => Text::_('COM_USERS_USER_BACKUPCODE'),
 					]
diff --git a/administrator/language/en-GB/com_users.ini b/administrator/language/en-GB/com_users.ini
index e38898a421b4..655fa69827d2 100644
--- a/administrator/language/en-GB/com_users.ini
+++ b/administrator/language/en-GB/com_users.ini
@@ -392,6 +392,7 @@ COM_USERS_USERS_TABLE_CAPTION="Table of Users"
 COM_USERS_USER_ACCOUNT_DETAILS="Account Details"
 COM_USERS_USER_BACKUPCODE="Backup Code"
 COM_USERS_USER_BACKUPCODES="Backup Codes"
+COM_USERS_USER_BACKUPCODES_CAPTIVE_PROMPT="If you do not have access to your usual Multi-factor Authentication method use any of your Backup Codes in the field below. Please remember that this emergency backup code cannot be reused."
 COM_USERS_USER_BACKUPCODES_DESC="Lets you access the site if all other Multi-factor Authentication methods you have set up fail."
 COM_USERS_USER_BATCH_FAILED="An error was encountered while performing the batch operation: %s."
 COM_USERS_USER_BATCH_SUCCESS="Batch operation completed."
diff --git a/administrator/language/en-GB/plg_multifactorauth_totp.ini b/administrator/language/en-GB/plg_multifactorauth_totp.ini
index cc7272f744cd..ac9c1c1be849 100644
--- a/administrator/language/en-GB/plg_multifactorauth_totp.ini
+++ b/administrator/language/en-GB/plg_multifactorauth_totp.ini
@@ -4,6 +4,7 @@
 ; Note : All ini files need to be saved as UTF-8
 
 PLG_MULTIFACTORAUTH_TOTP="Multi-factor Authentication - Verification Code"
+PLG_MULTIFACTORAUTH_TOTP_CAPTIVE_PROMPT="Please open your authenticator application or password manager and copy the six digit code for this site in the text box below, then click on the Validate button. If this code has been automatically filled in for you just click on the Validate button."
 PLG_MULTIFACTORAUTH_TOTP_ERR_VALIDATIONFAILED="You did not enter a valid verification code. Please check your authenticator app setup, and make sure that the time and time zone on your device is set correctly."
 PLG_MULTIFACTORAUTH_TOTP_LBL_LABEL="Enter the six digit verification code"
 PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_INSTRUCTIONS="Set up your verification code (also known as an “authenticator code”) using the information below. You can use an authenticator app (such Google Authenticator, Authy, LastPass Authenticator, etc), your favorite password manager (1Password, BitWarden, Keeper, KeePassXC, Strongbox, etc) or, in some cases, your browser."
diff --git a/administrator/language/en-GB/plg_multifactorauth_yubikey.ini b/administrator/language/en-GB/plg_multifactorauth_yubikey.ini
index e681af501e33..f50ce2e7126f 100644
--- a/administrator/language/en-GB/plg_multifactorauth_yubikey.ini
+++ b/administrator/language/en-GB/plg_multifactorauth_yubikey.ini
@@ -4,6 +4,7 @@
 ; Note : All ini files need to be saved as UTF-8
 
 PLG_MULTIFACTORAUTH_YUBIKEY="Multi-factor Authentication - YubiKey"
+PLG_MULTIFACTORAUTH_YUBIKEY_CAPTIVE_PROMPT="Please click in the text box below. Then insert your YubiKey into the USB port of your device and touch its golden disk or golden pad (depending on your model) to make it produce a YubiKey code. If you are on an NFC-capable phone or tablet with an NFC-enabled YubiKey you need to instead approach your YubiKey to the NFC reader area of your phone or tablet."
 PLG_MULTIFACTORAUTH_YUBIKEY_CODE_LABEL="YubiKey code"
 PLG_MULTIFACTORAUTH_YUBIKEY_ERR_VALIDATIONFAILED="You did not enter a valid YubiKey secret code or the YubiCloud servers are unreachable at this time."
 PLG_MULTIFACTORAUTH_YUBIKEY_LBL_AFTERSETUP_INSTRUCTIONS="You have already set up your YubiKey (the one generating codes starting with <code>%s</code>). You can only change its title from this page."
diff --git a/components/com_users/tmpl/captive/default.php b/components/com_users/tmpl/captive/default.php
index c96fc648ef60..8fc5247164ea 100644
--- a/components/com_users/tmpl/captive/default.php
+++ b/components/com_users/tmpl/captive/default.php
@@ -57,7 +57,7 @@ class="btn btn-sm btn-secondary"
 	</h2>
 
 	<?php if ($this->renderOptions['pre_message']): ?>
-		<div class="users-mfa-captive-pre-message text-muted">
+		<div class="users-mfa-captive-pre-message text-muted mb-3">
 			<?php echo $this->renderOptions['pre_message'] ?>
 		</div>
 	<?php endif; ?>
diff --git a/language/en-GB/com_users.ini b/language/en-GB/com_users.ini
index 38552435012b..05e469e62bf1 100644
--- a/language/en-GB/com_users.ini
+++ b/language/en-GB/com_users.ini
@@ -140,6 +140,7 @@ COM_USERS_RESET_REQUEST_LABEL="Please enter the email address for your account.
 COM_USERS_SETTINGS_FIELDSET_LABEL="Basic Settings"
 COM_USERS_USER_BACKUPCODE="Backup Code"
 COM_USERS_USER_BACKUPCODES="Backup Codes"
+COM_USERS_USER_BACKUPCODES_CAPTIVE_PROMPT="If you do not have access to your usual Multi-factor Authentication method use any of your Backup Codes in the field below. Please remember that this emergency backup code cannot be reused."
 COM_USERS_USER_BACKUPCODES_DESC="If you do not have access to your Multi-factor Authentication device you can use any of the following passwords instead of a regular security code. Each one of these emergency codes is immediately destroyed upon use. We recommend printing these codes out and keeping the printout in a safe and accessible location, eg your wallet or a safety deposit box."
 COM_USERS_USER_BLOCKED="This user is blocked. If this is an error, please contact an administrator."
 COM_USERS_USER_FIELD_BACKEND_LANGUAGE_LABEL="Backend Language"
diff --git a/plugins/multifactorauth/totp/src/Extension/Totp.php b/plugins/multifactorauth/totp/src/Extension/Totp.php
index 8241cfa4084b..4706a8ee3489 100644
--- a/plugins/multifactorauth/totp/src/Extension/Totp.php
+++ b/plugins/multifactorauth/totp/src/Extension/Totp.php
@@ -137,7 +137,7 @@ public function onUserMultifactorCaptive(Captive $event): void
 			new CaptiveRenderOptions(
 				[
 					// Custom HTML to display above the MFA form
-					'pre_message'      => '',
+					'pre_message'      => Text::_('PLG_MULTIFACTORAUTH_TOTP_CAPTIVE_PROMPT'),
 					// How to render the MFA code field. "input" (HTML input element) or "custom" (custom HTML)
 					'field_type'       => 'input',
 					// The type attribute for the HTML input box. Typically "text" or "password". Use any HTML5 input type.
diff --git a/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php b/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php
index 128e0a7c6ee1..57f40108dfee 100644
--- a/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php
+++ b/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php
@@ -139,7 +139,7 @@ public function onUserMultifactorCaptive(Captive $event): void
 			new CaptiveRenderOptions(
 				[
 					// Custom HTML to display above the MFA form
-					'pre_message'        => '',
+					'pre_message'        => Text::_('PLG_MULTIFACTORAUTH_YUBIKEY_CAPTIVE_PROMPT'),
 					// How to render the MFA code field. "input" (HTML input element) or "custom" (custom HTML)
 					'field_type'         => 'input',
 					// The type attribute for the HTML input box. Typically "text" or "password". Use any HTML5 input type.
@tecpromotion tecpromotion changed the title Add captive prompts for the rest of MFA methods [4.2] Add captive prompts for the rest of MFA methods Jun 19, 2022
heelc29 added a commit to heelc29/joomla that referenced this issue Jun 23, 2022
@heelc29 heelc29 linked a pull request Jun 23, 2022 that will close this issue
12 tasks
zero-24 added a commit that referenced this issue Jul 21, 2022
#2483)

* remove and add strings

in existing files

* add 10 new files

plg_multifactorauth_*

* translation plg_multifactorauth_email

* translation plg_multifactorauth_fixed

* translation plg_multifactorauth_totp

* translation plg_twofactorauth_yubikey

* translation plg_multifactorauth_webauthn

* fix #2486

* file header

* add strings

joomla/joomla-cms#38082

* fix #2506

* unification Passwort-Manager

* fix one Authentifikator

* fix year

* fix wording

* fix joomla.ini

* fix joomla.ini

* fix joomla.ini

* fix z. B.

* fix com_users.ini

translation

* fix translation

* fix Backup-Code

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.sys.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_totp.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* revert

* wording

* wording

* translation

* Update administrator/language/de-DE/plg_multifactorauth_fixed.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.sys.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_fixed.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_fixed.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_fixed.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_fixed.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Apply suggestions from code review

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Apply suggestions from code review

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Apply suggestions from code review

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

* Update administrator/language/de-DE/plg_multifactorauth_email.sys.ini

Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_totp.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_totp.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_totp.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>

* fix link

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* fix

* fix

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>

* fix

* Update administrator/language/de-DE/plg_multifactorauth_fixed.sys.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_fixed.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Apply suggestions from code review

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/plg_multifactorauth_yubikey.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update language/de-DE/com_users.ini

Co-authored-by: Dieter Ziller <max123kl@ziller.de>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_twofactorauth_totp.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_twofactorauth_totp.sys.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_twofactorauth_yubikey.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_twofactorauth_yubikey.sys.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update language/de-DE/com_users.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_email.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_email.sys.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/com_users.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_fixed.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_totp.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update language/de-DE/com_users.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_fixed.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_fixed.sys.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update administrator/language/de-DE/plg_multifactorauth_totp.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* add eo

* Update administrator/language/de-DE/plg_multifactorauth_webauthn.ini

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>

* Update language/de-DE/com_users.ini

* Update administrator/language/de-DE/com_users.ini

* fix

weil alle einen punkt haben

Co-authored-by: Christian Heel <66922325+heelc29@users.noreply.github.com>
Co-authored-by: Dieter Ziller <max123kl@ziller.de>
Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants