[Rt-commit] r9181 - in rt/branches/3.7-RTIR-RELENG: lib/RT/Interface

falcone at bestpractical.com falcone at bestpractical.com
Thu Sep 27 23:26:04 EDT 2007


Author: falcone
Date: Thu Sep 27 23:26:04 2007
New Revision: 9181

Modified:
   rt/branches/3.7-RTIR-RELENG/   (props changed)
   rt/branches/3.7-RTIR-RELENG/lib/RT/Interface/Email.pm

Log:
 r25047 at ketch:  falcone | 2007-09-27 23:22:56 -0400
 * second attempt to catch a failed passphrase in case DrySign
   succeeds.  Make sure we don't sent unsigned mail.


Modified: rt/branches/3.7-RTIR-RELENG/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.7-RTIR-RELENG/lib/RT/Interface/Email.pm	Thu Sep 27 23:26:04 2007
@@ -694,6 +694,14 @@
 
     my @bad_recipients;
     foreach my $line ( @status ) {
+        # if the passphrase fails, either you have a bad passphrase
+        # or gpg-agent has died.  That should get caught in Create and
+        # Update, but at least throw an error here
+        if (($line->{'Operation'}||'' eq 'PassphraseCheck')
+            && $line->{'Status'} =~ /^(?:BAD|MISSING)$/ ) {
+            $RT::Logger->error( "$line->{'Status'} PASSPHRASE: $line->{'Message'}" );
+            return 0;
+        }
         next unless ($line->{'Operation'}||'') eq 'RecipientsCheck';
         next if $line->{'Status'} eq 'DONE';
         $RT::Logger->error( $line->{'Message'} );


More information about the Rt-commit mailing list