Merge branch 'dev'
This commit is contained in:
commit
b85057171f
@ -67,7 +67,7 @@ $(document).ready(function() {
|
|||||||
type: "GET",
|
type: "GET",
|
||||||
cache: false,
|
cache: false,
|
||||||
dataType: 'script',
|
dataType: 'script',
|
||||||
url: "/api/v1/u2f-authentication/<?=(isset($_SESSION['pending_mailcow_cc_username'])) ? $_SESSION['pending_mailcow_cc_username'] : null;?>",
|
url: "/api/v1/get/u2f-authentication/<?=(isset($_SESSION['pending_mailcow_cc_username'])) ? $_SESSION['pending_mailcow_cc_username'] : null;?>",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
data;
|
data;
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ $(document).ready(function() {
|
|||||||
type: "GET",
|
type: "GET",
|
||||||
cache: false,
|
cache: false,
|
||||||
dataType: 'script',
|
dataType: 'script',
|
||||||
url: "/api/v1/u2f-registration/<?=(isset($_SESSION['mailcow_cc_username'])) ? $_SESSION['mailcow_cc_username'] : null;?>",
|
url: "/api/v1/get/u2f-registration/<?=(isset($_SESSION['mailcow_cc_username'])) ? $_SESSION['mailcow_cc_username'] : null;?>",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
data;
|
data;
|
||||||
}
|
}
|
||||||
|
@ -235,6 +235,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "u2f-registration":
|
case "u2f-registration":
|
||||||
|
header('Content-Type: application/javascript');
|
||||||
if (($_SESSION["mailcow_cc_role"] == "admin" || $_SESSION["mailcow_cc_role"] == "domainadmin") && $_SESSION["mailcow_cc_username"] == $object) {
|
if (($_SESSION["mailcow_cc_role"] == "admin" || $_SESSION["mailcow_cc_role"] == "domainadmin") && $_SESSION["mailcow_cc_username"] == $object) {
|
||||||
$data = $u2f->getRegisterData(get_u2f_registrations($object));
|
$data = $u2f->getRegisterData(get_u2f_registrations($object));
|
||||||
list($req, $sigs) = $data;
|
list($req, $sigs) = $data;
|
||||||
@ -246,6 +247,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "u2f-authentication":
|
case "u2f-authentication":
|
||||||
|
header('Content-Type: application/javascript');
|
||||||
if (isset($_SESSION['pending_mailcow_cc_username']) && $_SESSION['pending_mailcow_cc_username'] == $object) {
|
if (isset($_SESSION['pending_mailcow_cc_username']) && $_SESSION['pending_mailcow_cc_username'] == $object) {
|
||||||
$reqs = json_encode($u2f->getAuthenticateData(get_u2f_registrations($object)));
|
$reqs = json_encode($u2f->getAuthenticateData(get_u2f_registrations($object)));
|
||||||
$_SESSION['authReq'] = $reqs;
|
$_SESSION['authReq'] = $reqs;
|
||||||
|
Loading…
Reference in New Issue
Block a user