[Rt-commit] rt branch, 4.2/smime-v2-strict, updated. rt-4.0.4-505-g950fcbe
? sunnavy
sunnavy at bestpractical.com
Wed Jan 18 19:45:17 EST 2012
The branch, 4.2/smime-v2-strict has been updated
via 950fcbed8aa5d3129e86a7a5f3d3b515159301ae (commit)
from 0b665e4ba8e6d6419e39eedd59842be632d4a5c3 (commit)
Summary of changes:
lib/RT/Interface/Email/Auth/Crypt.pm | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit 950fcbed8aa5d3129e86a7a5f3d3b515159301ae
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jan 19 08:13:59 2012 +0800
check each parts' encryption before attaching original encrypted message
attaching changes MIME object's structure and may cause the check to fail.
diff --git a/lib/RT/Interface/Email/Auth/Crypt.pm b/lib/RT/Interface/Email/Auth/Crypt.pm
index febfafe..7a647a8 100644
--- a/lib/RT/Interface/Email/Auth/Crypt.pm
+++ b/lib/RT/Interface/Email/Auth/Crypt.pm
@@ -156,13 +156,6 @@ sub GetCurrentUser {
if $reject;
}
- # attach the original encrypted message
- $args{'Message'}->attach(
- Type => 'application/x-rt-original-message',
- Disposition => 'inline',
- Data => ${ $args{'RawMessageRef'} },
- );
-
my @found;
foreach my $part ( $args{'Message'}->parts_DFS ) {
my $decrypted;
@@ -201,6 +194,13 @@ sub GetCurrentUser {
);
}
+ # attach the original encrypted message
+ $args{'Message'}->attach(
+ Type => 'application/x-rt-original-message',
+ Disposition => 'inline',
+ Data => ${ $args{'RawMessageRef'} },
+ );
+
my %seen;
$args{'Message'}->head->replace( 'X-RT-Privacy' => $_ )
foreach grep !$seen{$_}++, @found;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list