[Rt-commit] rt branch, 4.2/forward-no-recipients, created. rt-4.2.3-87-g70d044c
Alex Vandiver
alexmv at bestpractical.com
Wed Apr 23 15:23:16 EDT 2014
The branch, 4.2/forward-no-recipients has been created
at 70d044c0ca9cd61bdb902a6abd350879fa553f56 (commit)
- Log -----------------------------------------------------------------
commit 70d044c0ca9cd61bdb902a6abd350879fa553f56
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Apr 23 15:22:45 2014 -0400
Ensure that a forward has recipients before sending it
Fixes I#25308.
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index 46c8f68..22af608 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -3035,6 +3035,9 @@ sub Forward {
$args{$_} = join ", ", map { $_->format } RT::EmailParser->ParseEmailAddress( $args{$_} || '' ) for qw(To Cc Bcc);
+ return (0, $self->loc("Can't forward: no valid email addresses specified") )
+ unless grep {length $args{$_}} qw/To Cc Bcc/;
+
my $mime = MIME::Entity->build(
Subject => $args{Subject},
Type => $args{ContentType},
-----------------------------------------------------------------------
More information about the rt-commit
mailing list