Finally allowed "username@domain.com" to be specified
[clearscm.git] / maps / bin / add2blacklist.cgi
index f7c29d5..06c8125 100755 (executable)
@@ -23,6 +23,7 @@ use lib "$FindBin::Bin/../lib";
 use MAPS;
 use MAPSLog;
 use MAPSWeb;
+use MAPSUtil;
 
 use CGI qw/:standard *table/;
 use CGI::Carp 'fatalsToBrowser';
@@ -43,7 +44,7 @@ sub Add2List() {
     last if ((!defined $pattern || $pattern eq '') &&
              (!defined $domain  || $domain  eq ''));
 
-    $sender = lc "$pattern\@$domain";
+    $sender = CheckEmail $pattern, $domain;
 
     my ($status, $rule) = OnBlacklist($sender);
 
@@ -100,7 +101,7 @@ print '<p></p><center>',
   hidden ({-name => 'type',
      -default    => $type}),
   submit ({-name => 'action',
-     -value      => 'Add New Entry'}),
+     -value      => 'Add'}),
   '</center>';
 
 Footing;