mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-09 08:50:05 +08:00
Fail with access denied when no Yubi api key was added
This commit is contained in:
parent
2738686eed
commit
1a33050d38
@ -1806,6 +1806,13 @@ function set_tfa($postarray) {
|
||||
|
||||
switch ($postarray["tfa_method"]) {
|
||||
case "yubi_otp":
|
||||
if (!$yubi) {
|
||||
$_SESSION['return'] = array(
|
||||
'type' => 'danger',
|
||||
'msg' => sprintf($lang['danger']['access_denied'])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if (!ctype_alnum($postarray["otp_token"]) || strlen($postarray["otp_token"]) != 44) {
|
||||
$_SESSION['return'] = array(
|
||||
'type' => 'danger',
|
||||
|
Loading…
Reference in New Issue
Block a user