[Rt-commit] r8766 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Tue Aug 28 14:38:14 EDT 2007
Author: ruz
Date: Tue Aug 28 14:38:14 2007
New Revision: 8766
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowGnuPGStatus
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowHistory
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction
Log:
r8646 at cubic-pc (orig r8645): sartak | 2007-08-20 21:23:58 +0400
r37766 at gorgoroth: sartak | 2007-08-20 13:23:05 -0400
Add optional warning to UI if an incoming mail is unsigned
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowGnuPGStatus
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowGnuPGStatus (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowGnuPGStatus Tue Aug 28 14:38:14 2007
@@ -56,16 +56,21 @@
</table>
<%ARGS>
$Attachment
+$WarnUnsigned => undef
</%ARGS>
<%INIT>
my @runs;
-foreach ( $Attachment->SplitHeaders ) {
- next unless s/^X-RT-GnuPG-Status:\s*//i;
+my $needs_unsigned_warning = $WarnUnsigned;
- require RT::Crypt::GnuPG;
- push @runs, [ RT::Crypt::GnuPG::ParseStatus( $_ ) ];
+foreach ( $Attachment->SplitHeaders ) {
+ if ( s/^X-RT-GnuPG-Status:\s*//i ) {
+ require RT::Crypt::GnuPG;
+ push @runs, [ RT::Crypt::GnuPG::ParseStatus( $_ ) ];
+ }
+ $needs_unsigned_warning = 0 if /^X-RT-Incoming-Signature:/;
}
-return unless @runs;
+
+return unless @runs or $needs_unsigned_warning;
my @messages;
foreach my $run ( @runs ) {
@@ -89,6 +94,9 @@
}
}
}
+
+push @messages, 'Warning! This is NOT signed!'
+ if $needs_unsigned_warning;
return unless @messages;
my %seen;
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowHistory
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowHistory (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowHistory Tue Aug 28 14:38:14 2007
@@ -160,4 +160,5 @@
$ShowHeaders => undef
$ShowTitle => 1
$ShowDisplayModes => 1
+$WarnUnsigned => undef
</%ARGS>
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction Tue Aug 28 14:38:14 2007
@@ -65,7 +65,7 @@
<tr>
<td colspan="4" class="content">
% if ( $Attachments->[0] && $Attachments->[0]->id ) {
- <& ShowGnuPGStatus, Attachment => $Attachments->[0] &>
+ <& ShowGnuPGStatus, Attachment => $Attachments->[0], WarnUnsigned => $WarnUnsigned &>
% }
% if ( $Transaction->CustomFieldValues->Count ) {
<& /Elements/ShowCustomFields, Object => $Transaction &>
@@ -92,6 +92,7 @@
$AttachmentContent => undef
$ShowBody => 1
$LastTransaction => 0
+$WarnUnsigned => undef
</%ARGS>
<%ONCE>
More information about the Rt-commit
mailing list