From b1599fd879ae83134362e718bb9855a34b2e05f4 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Mon, 7 Dec 2020 09:41:19 -0500 Subject: Fix logic when adding trailers without DKIM sigs If the message with a follow-up trailer did not include a DKIM signature, we didn't show it in the report for added trailers (we were still adding it to the resulting message). Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/b4/__init__.py b/b4/__init__.py index 695fe68..06c95db 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -1355,12 +1355,11 @@ class LoreMessage: if len(trailer) > 3 and trailer[3] is not None: fmsg = trailer[3] attsig = LoreAttestationSignatureDKIM(fmsg.msg) # noqa - if not attsig.present: - continue - if attsig.passing: - extra = ' (%s %s)' % (attweak, attsig.attestor.get_trailer()) - elif attpolicy in ('softfail', 'hardfail'): - extra = ' (%s %s)' % (attfail, attsig.attestor.get_trailer()) + if attsig.present: + if attsig.passing: + extra = ' (%s %s)' % (attweak, attsig.attestor.get_trailer()) + elif attpolicy in ('softfail', 'hardfail'): + extra = ' (%s %s)' % (attfail, attsig.attestor.get_trailer()) logger.info(' + %s: %s%s', trailer[0], trailer[1], extra) else: logger.debug(' . %s: %s', trailer[0], trailer[1]) -- cgit v1.2.3