[Web] Fix U2F authentication, fixes #3468
parent
ce6d6a01f3
commit
942ddcc212
|
@ -235,7 +235,6 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||
));
|
||||
exit();
|
||||
}
|
||||
if (!isset($_SESSION['pending_mailcow_cc_username'])) {
|
||||
switch ($category) {
|
||||
case "u2f-registration":
|
||||
header('Content-Type: application/javascript');
|
||||
|
@ -247,6 +246,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||
echo 'var registeredKeys = ' . json_encode($sigs) . ';';
|
||||
echo 'var appId = req.appId;';
|
||||
echo 'var registerRequests = [{version: req.version, challenge: req.challenge}];';
|
||||
return;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
|
@ -268,11 +268,15 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||
echo 'var appId = "' . $appId . '";';
|
||||
echo 'var challenge = ' . json_encode($challenge) . ';';
|
||||
echo 'var registeredKeys = ' . json_encode($registeredKey) . ';';
|
||||
return;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (!isset($_SESSION['pending_mailcow_cc_username'])) {
|
||||
switch ($category) {
|
||||
case "rspamd":
|
||||
switch ($object) {
|
||||
case "actions":
|
||||
|
|
Loading…
Reference in New Issue