[Web] Fix textarea number width > 999

[Web] Do not create 2M session file when saving large Rspamd global filter maps (thanks @Drago)
[Web] Do not cache content of Rspamd global filter maps
This commit is contained in:
andryyy
2021-03-08 12:36:23 +01:00
parent 749dc0e5c9
commit 0b19c77cdc
3 changed files with 6 additions and 6 deletions

View File

@@ -137,7 +137,7 @@ function rspamd_maps($_action, $_data = null) {
if ($_SESSION['mailcow_cc_role'] != "admin") {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
'log' => array(__FUNCTION__, $_action, '-'),
'msg' => 'access_denied'
);
return false;
@@ -148,7 +148,7 @@ function rspamd_maps($_action, $_data = null) {
if (!in_array($map, $rspamd_map_type)) {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
'log' => array(__FUNCTION__, $_action, '-'),
'msg' => array('global_map_invalid', $map)
);
continue;
@@ -170,14 +170,14 @@ function rspamd_maps($_action, $_data = null) {
catch (Exception $e) {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
'log' => array(__FUNCTION__, $_action, '-'),
'msg' => array('global_map_write_error', htmlspecialchars($map), htmlspecialchars($e->getMessage()))
);
continue;
}
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
'log' => array(__FUNCTION__, $_action, '-'),
'msg' => array('object_modified', htmlspecialchars($map))
);
}