Register reauthentication after authenticating in LoginForm and MFAuthenticationForm
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 8 Jan 2021 15:58:12 +0000 (16:58 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 21 Jan 2021 10:10:21 +0000 (11:10 +0100)
wcfsetup/install/files/lib/acp/form/LoginForm.class.php
wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php

index a1ab4f6dca809150f9cf8d877390a25798bba27a..8c3ad94b1501302a32363e786ba2522eb461ff60 100755 (executable)
@@ -203,6 +203,9 @@ class LoginForm extends AbstractCaptchaForm {
                
                // change user
                $needsMultifactor = WCF::getSession()->changeUserAfterMultifactorAuthentication($this->user);
+               if (!$needsMultifactor) {
+                       WCF::getSession()->registerReauthentication();
+               }
                $this->saved();
                
                $this->performRedirect($needsMultifactor);
index 80e2e5a9d410d6d96b3f8e58de5bd2b4c0f06eac..18f1f1a623ddd67a4c0dd067bb0285d9254d86f0 100644 (file)
@@ -138,6 +138,7 @@ class MultifactorAuthenticationForm extends AbstractFormBuilderForm {
                WCF::getDB()->commitTransaction();
                
                WCF::getSession()->applyPendingUserChange($this->user);
+               WCF::getSession()->registerReauthentication();
                
                $this->saved();
        }