Add missing language item
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Dec 2020 10:43:16 +0000 (11:43 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Dec 2020 10:43:16 +0000 (11:43 +0100)
wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php
wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php
wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 8d63feb11f943ccc8c138cfe7e2d94e67d58494c..a7270d32bf07f8af9e032fcae3ca4783687091b9 100644 (file)
@@ -272,7 +272,10 @@ class BackupMultifactorMethod implements IMultifactorMethod {
                                        
                                        if ($this->findValidCode($userCode, $codes) === null) {
                                                $field->value('');
-                                               $field->addValidationError(new FormFieldValidationError('invalid'));
+                                               $field->addValidationError(new FormFieldValidationError(
+                                                       'invalidCode',
+                                                       'wcf.user.security.multifactor.error.invalidCode'
+                                               ));
                                        }
                                })),
                ]);
index 740ae8144c02bea14131d229048dcc3f43cd4ec7..58799f51a6d42b05ff2f2779e6378e202497ff5f 100644 (file)
@@ -201,7 +201,10 @@ class EmailMultifactorMethod implements IMultifactorMethod {
                                        
                                        if ($this->findValidCode($userCode, $codes) === null) {
                                                $field->value('');
-                                               $field->addValidationError(new FormFieldValidationError('invalid'));
+                                               $field->addValidationError(new FormFieldValidationError(
+                                                       'invalidCode',
+                                                       'wcf.user.security.multifactor.error.invalidCode'
+                                               ));
                                        }
                                })),
                ]);
index 6a7e1ce03d7b1ccd83637458e66bd705368b43c8..e1e1fa79bd48f77ba1079841f5e87b0e261a8013 100644 (file)
@@ -81,7 +81,10 @@ class TotpMultifactorMethod implements IMultifactorMethod {
                                                $minCounter = 0;
                                                if (!$totp->validateTotpCode($field->getValue(), $minCounter, new \DateTime())) {
                                                        $field->value('');
-                                                       $field->addValidationError(new FormFieldValidationError('invalid'));
+                                                       $field->addValidationError(new FormFieldValidationError(
+                                                               'invalidCode',
+                                                               'wcf.user.security.multifactor.error.invalidCode'
+                                                       ));
                                                }
                                                $field->minCounter($minCounter);
                                        })),
@@ -310,14 +313,18 @@ class TotpMultifactorMethod implements IMultifactorMethod {
                                                }
                                        }
                                        if ($selectedDevice === null) {
-                                               $field->addValidationError(new FormFieldValidationError('invalid'));
+                                               // This should never happen.
+                                               $field->addValidationError(new FormFieldValidationError('unreachable'));
                                        }
                                        
                                        $totp = new Totp($selectedDevice['secret']);
                                        $minCounter = $selectedDevice['minCounter'];
                                        if (!$totp->validateTotpCode($field->getValue(), $minCounter, new \DateTime())) {
                                                $field->value('');
-                                               $field->addValidationError(new FormFieldValidationError('invalid'));
+                                               $field->addValidationError(new FormFieldValidationError(
+                                                       'invalidCode',
+                                                       'wcf.user.security.multifactor.error.invalidCode'
+                                               ));
                                        }
                                        $field->minCounter($minCounter);
                                })),
index 4e9eadc0efd8756e3f8bcc971085b5b1a476e0e4..63a125b164662c4426ccd6259e8fa6f50891566c 100644 (file)
@@ -4959,6 +4959,7 @@ Die E-Mail-Adresse des neuen Benutzers lautet: {@$user->email}
 {if LANGUAGE_USE_INFORMAL_VARIANT}Du hast{else}Sie haben{/if} auch eine Liste von Notfallcodes erhalten, falls der zusätzliche Faktor unbrauchbar werden sollte. **{if LANGUAGE_USE_INFORMAL_VARIANT}Hast du dir{else}Haben Sie sich{/if} die Notfallcodes notiert?** Falls {if LANGUAGE_USE_INFORMAL_VARIANT}du es vergessen hast, kannst du{else}Sie es vergessen haben, können Sie{/if} dies nachholen, indem {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} in der Verwaltung der Notfallcodes [URL:{link controller='MultifactorManage' object=$backupMethod isEmail=true}{/link}] neue Notfallcodes {if LANGUAGE_USE_INFORMAL_VARIANT}generierst{else}generieren{/if}.]]></item>
                <item name="wcf.user.security.multifactor.authentication.noPendingUserChange"><![CDATA[Die Mehrfaktor-Authentifizierung wurde nicht rechtzeitig abgeschlossen. Aus Sicherheitsgründen wurde der unvollständige Login-Vorgang abgebrochen. Bitte <a href="{link controller='Login'}{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}logge dich{else}loggen Sie sich{/if}</a> erneut ein.]]></item>
                <item name="wcf.user.security.multifactor.authentication.noSetup"><![CDATA[Das Benutzerkonto <strong>{$user->username}</strong> ist mit der Mehrfaktor-Authentifizierung geschützt, es sind jedoch keine aktiven Verfahren verfügbar. Bitte {if LANGUAGE_USE_INFORMAL_VARIANT}wende dich{else}wenden Sie sich{/if} an den Administrator.]]></item>
+               <item name="wcf.user.security.multifactor.error.invalidCode"><![CDATA[Der eingebene Code ist ungültig.]]></item>
        </category>
        <category name="wcf.user.trophy">
                <item name="wcf.user.trophy.trophyPoints"><![CDATA[Trophäen]]></item>
index 3ae070544d24b05ae5b8274e41702c7179ba6cda..5c8f127f3f6663d28e3656c89e4650ceb9c6e38f 100644 (file)
@@ -4956,6 +4956,7 @@ You successfully enabled multi-factor authentication using the „{lang}wcf.user
 You also received a list of emergency codes to use when your second factor becomes unavailable. **Did you store these emergency codes securely?** If you forgot you can do now by generating new codes in the Emergency Code Management [URL:{link controller='MultifactorManage' object=$backupMethod isEmail=true}{/link}].]]></item>
                <item name="wcf.user.security.multifactor.authentication.noPendingUserChange"><![CDATA[The multi-factor authentication was not completed in time. The incomplete login process was aborted for security reasons. Please <a href="{link controller='Login'}{/link}">Login</a> once again.]]></item>
                <item name="wcf.user.security.multifactor.authentication.noSetup"><![CDATA[The account <strong>{$user->username}</strong> is protected by multi-factor authentication, but no methods are set up. Please contact the administrator for support.]]></item>
+               <item name="wcf.user.security.multifactor.error.invalidCode"><![CDATA[The given code is invalid.]]></item>
        </category>
        <category name="wcf.user.trophy">
                <item name="wcf.user.trophy.trophyPoints"><![CDATA[Trophies]]></item>