[Rt-devel] Bug in Ticket/Elements/ShowGnuPGStatus

Otmar Lendl ol at bofh.priv.at
Mon Apr 7 10:29:17 EDT 2008


Folks,

I've been debugging my RTIR installation regarding GnuPG (my main error
turned out to be the missing 
Set(@MailPlugins, 'Auth::MailFrom', 'Auth::GnuPG');
line in the SiteConfig) when I took a closer look at Ticket/Elements/ShowGnuPGStatus

The following code seems to contain a logical error:

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:/;

    # if this is not set, then the email is generated by RT, and so we don't
    # need "email is unsigned" warnings
    $needs_unsigned_warning = 0 if not /^Received:/;
}

Shouldn't the logic be "$needs_unsigned_warning = 0" if no Received:
header was was found, instead of = 0 if there is at least one header
that is not a Received: one?

Secondly, this will never ever recheck a signature unless 'Auth::GnuPG'
was enabled when the mail came in. This may be by design, but it's not
perfect.

/ol
-- 
-=-  Otmar Lendl  --  ol at bofh.priv.at  -=-


More information about the Rt-devel mailing list