mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-13 07:11: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);
|
$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);
|
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)
|
foreach($this->VARARRAY as $key=>$value)
|
||||||
{
|
{
|
||||||
if($key!="")
|
if($key!="")
|
||||||
|
@ -104,7 +104,6 @@ class Totp
|
|||||||
{
|
{
|
||||||
/** @var TOTPLoginService $totpLoginService */
|
/** @var TOTPLoginService $totpLoginService */
|
||||||
$totpLoginService = $this->app->Container->get('TOTPLoginService');
|
$totpLoginService = $this->app->Container->get('TOTPLoginService');
|
||||||
|
|
||||||
if(!$totpLoginService->isTOTPEnabled($userID)){
|
if(!$totpLoginService->isTOTPEnabled($userID)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -120,7 +119,7 @@ class Totp
|
|||||||
|
|
||||||
$secret = $tokenManager->generateBase32Secret();
|
$secret = $tokenManager->generateBase32Secret();
|
||||||
|
|
||||||
$label = 'Xentral' . ' | ' . $this->app->erp->GetFirmaName();
|
$label = 'OpenXE' . ':' . $this->app->User->Getname();
|
||||||
|
|
||||||
$qr = $totpLoginService->generatePairingQrCode($this->app->User->GetID(), $label, $secret);
|
$qr = $totpLoginService->generatePairingQrCode($this->app->User->GetID(), $label, $secret);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user