[Web] Fix global maps

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

No files matched your search

+9 -7
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)) {