summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-11-25 15:02:48 +0000
committerfukachan <fukachan>2001-11-25 15:02:48 +0000
commit70a185a9f99058dec82340f186dfabcf98af2a3c (patch)
treeca22ab7d46b8c7a61178f4a7e88837b5a9822d66 /fml/lib
parentd72200f1822c2205129b9709250791b0d67863b3 (diff)
downloadfml8-70a185a9f99058dec82340f186dfabcf98af2a3c.tar.gz
fml8-70a185a9f99058dec82340f186dfabcf98af2a3c.tar.bz2
fml8-70a185a9f99058dec82340f186dfabcf98af2a3c.zip
validate get_first_plaintext_message() return value
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Filter/BodyCheck.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/fml/lib/FML/Filter/BodyCheck.pm b/fml/lib/FML/Filter/BodyCheck.pm
index 254c2654..212dd643 100644
--- a/fml/lib/FML/Filter/BodyCheck.pm
+++ b/fml/lib/FML/Filter/BodyCheck.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: BodyCheck.pm,v 1.8 2001/10/14 22:25:31 fukachan Exp $
+# $FML: BodyCheck.pm,v 1.9 2001/10/27 04:50:38 fukachan Exp $
#
package FML::Filter::BodyCheck;
@@ -106,6 +106,11 @@ sub body_check
# get_first_plaintext_message() return the first mime part block
# with the "plain/text" type.
my $m = $msg->get_first_plaintext_message();
+ # message without valid text part e.g. text/html (not multipart)
+ unless (defined $m) {
+ my $r = "no text part, ignored";
+ return undef;
+ }
## 4. check only the last paragraph
# XXX if message size > 1024 or not, we change the buffer to check.