[Rt-commit] rt branch, 4.0/load-user-in-sendmail-fix, created. rt-4.0.0-409-g6425485
? sunnavy
sunnavy at bestpractical.com
Fri May 20 13:01:20 EDT 2011
The branch, 4.0/load-user-in-sendmail-fix has been created
at 6425485ab7e11a782a3671f43350dfdfbae6a3bb (commit)
- Log -----------------------------------------------------------------
commit afa767d6d4673f14c35c7c4b1d7ab73353e525e9
Author: Bram <rtdevel at lists.wizbit.be>
Date: Thu Jan 7 11:01:44 2010 +0100
Remove empty recipients from the To, Cc and Bcc header before removing the inappropriate recipients
diff --git a/lib/RT/Action/SendEmail.pm b/lib/RT/Action/SendEmail.pm
index cc63106..29052c8 100644
--- a/lib/RT/Action/SendEmail.pm
+++ b/lib/RT/Action/SendEmail.pm
@@ -165,8 +165,6 @@ sub Prepare {
# Header
$self->SetRTSpecialHeaders();
- $self->RemoveInappropriateRecipients();
-
my %seen;
foreach my $type (@EMAIL_RECIPIENT_HEADERS) {
@{ $self->{$type} }
@@ -174,6 +172,8 @@ sub Prepare {
@{ $self->{$type} };
}
+ $self->RemoveInappropriateRecipients();
+
# Go add all the Tos, Ccs and Bccs that we need to to the message to
# make it happy, but only if we actually have values in those arrays.
commit 6425485ab7e11a782a3671f43350dfdfbae6a3bb
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat May 21 00:46:42 2011 +0800
test if user's existance before calling ->Privileged to avoid warnings
diff --git a/lib/RT/Action/SendEmail.pm b/lib/RT/Action/SendEmail.pm
index 29052c8..553b736 100644
--- a/lib/RT/Action/SendEmail.pm
+++ b/lib/RT/Action/SendEmail.pm
@@ -779,7 +779,7 @@ sub RemoveInappropriateRecipients {
foreach my $addr ( @{ $self->{$type} } ) {
my $user = RT::User->new(RT->SystemUser);
$user->LoadByEmail($addr);
- push @blacklist, $addr if ( !$user->Privileged );
+ push @blacklist, $addr unless $user->id && $user->Privileged;
}
}
$RT::Logger->info( $msgid
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list