mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
bugfix TOTP, additional database entries needed: login_password_check_otp (hook), TOTPCheckLogin (hook_register)
This commit is contained in:
parent
94f3fb0261
commit
5ad57e2fc8
@ -270,7 +270,7 @@ class TOTPLoginService
|
||||
$secret = $this->getTOTPSecret($userId);
|
||||
}
|
||||
|
||||
$query = "otpauth://totp/{$label}?secret=" . $secret . '&issuer=Xentral&algorithm=SHA1&digits=6&period=30';
|
||||
$query = "otpauth://totp/{$label}?secret=" . $secret . '&issuer=OpenXE&algorithm=SHA1&digits=6&period=30';
|
||||
|
||||
return $this->barcodeService->createQrCode($query);
|
||||
}
|
||||
|
@ -616,7 +616,7 @@ class TemplateParser {
|
||||
}
|
||||
}
|
||||
|
||||
if(count($this->VARARRAY)>0)
|
||||
if(!empty($this->VARARRAY))
|
||||
foreach($this->VARARRAY as $key=>$value)
|
||||
{
|
||||
if($key!="")
|
||||
|
@ -104,7 +104,6 @@ class Totp
|
||||
{
|
||||
/** @var TOTPLoginService $totpLoginService */
|
||||
$totpLoginService = $this->app->Container->get('TOTPLoginService');
|
||||
|
||||
if(!$totpLoginService->isTOTPEnabled($userID)){
|
||||
return;
|
||||
}
|
||||
@ -120,7 +119,7 @@ class Totp
|
||||
|
||||
$secret = $tokenManager->generateBase32Secret();
|
||||
|
||||
$label = 'Xentral' . ' | ' . $this->app->erp->GetFirmaName();
|
||||
$label = 'OpenXE' . ':' . $this->app->User->Getname();
|
||||
|
||||
$qr = $totpLoginService->generatePairingQrCode($this->app->User->GetID(), $label, $secret);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user