summaryrefslogtreecommitdiff
path: root/fml/lib/FML
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-04-28 13:34:15 +0000
committerfukachan <fukachan>2002-04-28 13:34:15 +0000
commita1deb717ee1aa15d13d58fbb30b17536f1b401b8 (patch)
tree96e10d8cefd582df39208dfcd16142bf16fb4796 /fml/lib/FML
parent898e2ca19b8eebaf3d768872997d6ddeaedf5cf6 (diff)
downloadfml8-a1deb717ee1aa15d13d58fbb30b17536f1b401b8.tar.gz
fml8-a1deb717ee1aa15d13d58fbb30b17536f1b401b8.tar.bz2
fml8-a1deb717ee1aa15d13d58fbb30b17536f1b401b8.zip
validate by defined() more
Diffstat (limited to 'fml/lib/FML')
-rw-r--r--fml/lib/FML/Header.pm17
-rw-r--r--fml/lib/FML/Process/Distribute.pm12
2 files changed, 20 insertions, 9 deletions
diff --git a/fml/lib/FML/Header.pm b/fml/lib/FML/Header.pm
index 7936cac6..3ca677a9 100644
--- a/fml/lib/FML/Header.pm
+++ b/fml/lib/FML/Header.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Header.pm,v 1.39 2001/12/23 09:20:41 fukachan Exp $
+# $FML: Header.pm,v 1.40 2002/04/08 12:44:23 fukachan Exp $
#
package FML::Header;
@@ -138,12 +138,17 @@ sub address_clean_up
my @addrlist = Mail::Address->parse($addr);
# only the first element in the @addrlist array is effective.
- $addr = $addrlist[0]->address;
- $addr =~ s/^\s*<//;
- $addr =~ s/>\s*$//;
+ if (defined $addrlist[0]) {
+ $addr = $addrlist[0]->address;
+ $addr =~ s/^\s*<//;
+ $addr =~ s/>\s*$//;
- # return the result.
- return $addr;
+ # return the result.
+ return $addr;
+ }
+ else {
+ return undef;
+ }
}
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 78b77a96..2be6afef 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.73 2002/04/18 15:36:30 fukachan Exp $
+# $FML: Distribute.pm,v 1.74 2002/04/23 14:10:33 fukachan Exp $
#
package FML::Process::Distribute;
@@ -108,8 +108,14 @@ sub verify_request
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
$curproc->verify_sender_credential();
- $curproc->simple_loop_check();
- $curproc->_check_filter($args);
+
+ unless ($curproc->is_refused()) {
+ $curproc->simple_loop_check();
+ }
+
+ unless ($curproc->is_refused()) {
+ $curproc->_check_filter($args);
+ }
$eval = $config->get_hook( 'distribute_verify_request_end_hook' );
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }