Skip to content

Commit bb0b998

Browse files
author
Demian
committed
Trim whitespace from email fields in spamfilter whitelist and blacklist forms #6883
Added a TRIM filter on the 'email' field during SAVE event in spamfilter_blacklist.tform.php and spamfilter_whitelist.tform.php. This ensure whitespaces are removed from email field, allowing the whitelist and blacklist entries to be properly written to the rspamd configuration.
1 parent bb37295 commit bb0b998

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

interface/web/mail/form/spamfilter_blacklist.tform.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@
105105
3 => array( 'event' => 'SAVE',
106106
'type' => 'STRIPTAGS'),
107107
4 => array( 'event' => 'SAVE',
108-
'type' => 'STRIPNL')
108+
'type' => 'STRIPNL'),
109+
5 => array( 'event' => 'SAVE',
110+
'type' => 'TRIM')
109111
),
110112
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
111113
'errmsg'=> 'email_error_notempty'),

interface/web/mail/form/spamfilter_whitelist.tform.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@
105105
3 => array( 'event' => 'SAVE',
106106
'type' => 'STRIPTAGS'),
107107
4 => array( 'event' => 'SAVE',
108-
'type' => 'STRIPNL')
108+
'type' => 'STRIPNL'),
109+
5 => array( 'event' => 'SAVE',
110+
'type' => 'TRIM')
109111
),
110112
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
111113
'errmsg'=> 'email_error_notempty'),

0 commit comments

Comments
 (0)