[Web] Fix global maps

This commit is contained in:
andryyy
2019-12-27 15:51:23 +01:00
parent bf2b0ab785
commit a89df381f8
3 changed files with 11 additions and 8 deletions

View File

@@ -218,13 +218,15 @@ function rspamd($_action, $_data = null) {
}
$maps = (array)$_data['map'];
foreach ($maps as $map) {
if (!in_array($map, $RSPAMD_MAPS)) {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('global_map_invalid', $map)
);
continue;
foreach ($RSPAMD_MAPS as $rspamd_map_type) {
if (!in_array($map, $rspamd_map_type)) {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('global_map_invalid', $map)
);
continue;
}
}
try {
if (file_exists('/rspamd_custom_maps/' . $map)) {