ispman/lib/ISPMan MessagingMan.pm,1.4,1.5
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27167/lib/ISPMan
Modified Files:
MessagingMan.pm
Log Message:
applying patch [ 1517858 ] notifyUsers
Index: MessagingMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/MessagingMan.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- MessagingMan.pm 30 May 2004 23:35:37 -0000 1.4
+++ MessagingMan.pm 6 Jul 2006 21:30:33 -0000 1.5
@@ -2,8 +2,10 @@
use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+use Email::Valid;
# Atif: 2003-08-08
+# derjohn: 2006-07-05: changes and fixes
# Do not load Mail::Internet here
# use it in the send_email_to_domain.lib where it is actually used
# use Mail::Internet;
@@ -31,14 +33,24 @@
my $ok = 1;
my $err = '';
+ my $verifier = new Email::Valid;
+
if ( $r->param('fromEmail') ) {
- if ( $r->param('fromEmail') !~ /^(\w|\.)+\@\w+\.(\w|\.)+\w$/ ) {
+ if (
+ !$verifier->address(
+ -address => $r->param('fromEmail'),
+ -fqdn => 1
+ )
+ )
+ {
$err .= 'Invalid e-mail address. ';
$ok = 0;
}
- if ( $r->param('cc')
- && $r->param('cc') !~ /^(\w|\.)+\@\w+\.(\w|\.)+\w$/ )
+ if ( $r->param('cc')
+ && !(
+ $verifier->address( -address => $r->param('cc'), -fqdn => 1 ) )
+ )
{
$err .= 'Invalid CC: e-mail address. ';
$ok = 0;
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642