mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-07-25 09:04:32 +00:00
add missing object-level access control
This commit is contained in:
@@ -2062,6 +2062,14 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foreach ($usernames as $username) {
|
foreach ($usernames as $username) {
|
||||||
|
if (!hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $username)) {
|
||||||
|
$_SESSION['return'][] = array(
|
||||||
|
'type' => 'danger',
|
||||||
|
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||||
|
'msg' => 'access_denied'
|
||||||
|
);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($_data['spam_score'] == "default") {
|
if ($_data['spam_score'] == "default") {
|
||||||
$stmt = $pdo->prepare("DELETE FROM `filterconf` WHERE `object` = :username
|
$stmt = $pdo->prepare("DELETE FROM `filterconf` WHERE `object` = :username
|
||||||
AND (`option` = 'lowspamlevel' OR `option` = 'highspamlevel')");
|
AND (`option` = 'lowspamlevel' OR `option` = 'highspamlevel')");
|
||||||
|
|||||||
Reference in New Issue
Block a user