From: Tim Düsterhus Date: Fri, 8 Jan 2021 15:58:12 +0000 (+0100) Subject: Register reauthentication after authenticating in LoginForm and MFAuthenticationForm X-Git-Tag: 5.4.0_Alpha_1~409^2^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4624ceeda0e19109245d19e883dc6fd388e95519;p=GitHub%2FWoltLab%2FWCF.git Register reauthentication after authenticating in LoginForm and MFAuthenticationForm --- diff --git a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php index a1ab4f6dca..8c3ad94b15 100755 --- a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php @@ -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); diff --git a/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php b/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php index 80e2e5a9d4..18f1f1a623 100644 --- a/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php +++ b/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php @@ -138,6 +138,7 @@ class MultifactorAuthenticationForm extends AbstractFormBuilderForm { WCF::getDB()->commitTransaction(); WCF::getSession()->applyPendingUserChange($this->user); + WCF::getSession()->registerReauthentication(); $this->saved(); }