From 0d09c86c124e9a4f17f6813ce06cc4537ce81b46 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Wed, 3 Apr 2024 10:08:18 +0200 Subject: [PATCH] [Web] fix invalid rspamd map check --- data/web/inc/functions.rspamd.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/web/inc/functions.rspamd.inc.php b/data/web/inc/functions.rspamd.inc.php index fd1c5bd6..ec86919c 100644 --- a/data/web/inc/functions.rspamd.inc.php +++ b/data/web/inc/functions.rspamd.inc.php @@ -143,6 +143,7 @@ function rspamd_maps($_action, $_data = null) { return false; } $maps = (array)$_data['map']; + $valid_maps = array(); foreach ($maps as $map) { foreach ($RSPAMD_MAPS as $rspamd_map_type) { if (!in_array($map, $rspamd_map_type)) { @@ -151,9 +152,12 @@ function rspamd_maps($_action, $_data = null) { 'log' => array(__FUNCTION__, $_action, '-'), 'msg' => array('global_map_invalid', $map) ); - continue; + } else { + array_push($valid_maps, $map); } } + } + foreach ($valid_maps as $map) { try { if (file_exists('/rspamd_custom_maps/' . $map)) { $map_content = trim($_data['rspamd_map_data']);