mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-03 08:40:05 +08:00
Merge branch 'hotfix' into app-passwd-daveas
This commit is contained in:
commit
7fdd73135b
@ -35,13 +35,8 @@ elseif (isset($_GET['login'])) {
|
||||
$is_dual = (!empty($_SESSION["dual-login"]["username"])) ? true : false;
|
||||
// check permissions (if dual_login is active, deny sso when acl is not given)
|
||||
$login = html_entity_decode(rawurldecode($_GET["login"]));
|
||||
if ($ALLOW_ADMIN_EMAIL_LOGIN === 0 && $is_dual === true) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
echo "Admin login is forbidden";
|
||||
exit;
|
||||
}
|
||||
if (isset($_SESSION['mailcow_cc_role']) &&
|
||||
($_SESSION['acl']['login_as'] == "1" || ($is_dual === false && $login == $_SESSION['mailcow_cc_username']))) {
|
||||
(($_SESSION['acl']['login_as'] == "1" && $ALLOW_ADMIN_EMAIL_LOGIN !== 0) || ($is_dual === false && $login == $_SESSION['mailcow_cc_username']))) {
|
||||
if (filter_var($login, FILTER_VALIDATE_EMAIL)) {
|
||||
if (user_get_alias_details($login) !== false) {
|
||||
// load master password
|
||||
@ -56,7 +51,7 @@ elseif (isset($_GET['login'])) {
|
||||
}
|
||||
}
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
echo "Access is forbidden";
|
||||
echo "Forbidden";
|
||||
exit;
|
||||
}
|
||||
// only check for admin-login on sogo GUI requests
|
||||
|
Loading…
Reference in New Issue
Block a user