[Web] Fix global maps
parent
bf2b0ab785
commit
a89df381f8
|
@ -1186,7 +1186,7 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" for="<?=$rspamd_regex_map;?>"><?=$rspamd_regex_desc;?><br><small><?=$rspamd_regex_map;?></small></label>
|
||||
<div class="col-sm-9">
|
||||
<textarea id="<?=$rspamd_regex_map;?>" spellcheck="false" autocorrect="off" autocapitalize="none" class="form-control textarea-code" rows="10" name="rspamd_regex_map_data" required><?=file_get_contents('/rspamd_custom_maps/' . $rspamd_regex_map);?></textarea>
|
||||
<textarea id="<?=$rspamd_regex_map;?>" spellcheck="false" autocorrect="off" autocapitalize="none" class="form-control textarea-code" rows="10" name="rspamd_map_data" required><?=file_get_contents('/rspamd_custom_maps/' . $rspamd_regex_map);?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
@ -218,7 +218,8 @@ function rspamd($_action, $_data = null) {
|
|||
}
|
||||
$maps = (array)$_data['map'];
|
||||
foreach ($maps as $map) {
|
||||
if (!in_array($map, $RSPAMD_MAPS)) {
|
||||
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),
|
||||
|
@ -226,6 +227,7 @@ function rspamd($_action, $_data = null) {
|
|||
);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (file_exists('/rspamd_custom_maps/' . $map)) {
|
||||
$map_content = trim($_data['rspamd_map_data']);
|
||||
|
|
|
@ -166,6 +166,7 @@ $RSPAMD_MAPS = array(
|
|||
'Recipient Whitelist' => 'global_rcpt_whitelist.map',
|
||||
'Fishy TLDS (only fired in combination with bad words)' => 'fishy_tlds.map',
|
||||
'Bad Words (only fired in combination with fishy TLDs)' => 'bad_words.map',
|
||||
'Bad Words DE (only fired in combination with fishy TLDs)' => 'bad_words_de.map',
|
||||
'Bad Languages' => 'bad_languages.map',
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue