assert sessioned OTP object

This commit is contained in:
Daniel Seifert 2024-09-20 21:57:13 +02:00
parent f43eb2584a
commit bef6651a3f
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170

View File

@ -99,6 +99,7 @@ class d3user_totp extends AdminDetailsController
$aParams['d3totp__usetotp'] = 1; $aParams['d3totp__usetotp'] = 1;
/** @var d3totp $init */ /** @var d3totp $init */
$init = Registry::getSession()->getVariable(d3totp_conf::OTP_SESSION_VARNAME); $init = Registry::getSession()->getVariable(d3totp_conf::OTP_SESSION_VARNAME);
Assert::that($init)->isInstanceOf(d3totp::class, 'D3_TOTP_INITOBJECT_MISSING');
$seed = $init->getSecret(); $seed = $init->getSecret();
$otp = Registry::getRequest()->getRequestEscapedParameter("otp"); $otp = Registry::getRequest()->getRequestEscapedParameter("otp");