From 681623ed6122bf69a5055d173cc5521da672adf9 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 14 May 2021 12:34:37 -0400 Subject: Ensure trailers are tracked with source messages When we aggregate trailers, make sure that we track their originating messages so we can properly check attestation on all of them. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/b4/__init__.py b/b4/__init__.py index 1c6d89b..d1a66fc 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -327,7 +327,8 @@ class LoreMailbox: break if pmsg.in_reply_to and pmsg.in_reply_to in self.msgid_map: lvl += 1 - trailers += pmsg.trailers + for ptrailer in pmsg.trailers: + trailers.append(tuple(ptrailer + [pmsg])) pmsg = self.msgid_map[pmsg.in_reply_to] continue break @@ -1358,7 +1359,7 @@ class LoreMessage: fixtrailers.append(list(trailer[:3])) if trailer[:3] not in btrailers: extra = '' - if len(trailer) > 3 and trailer[3] is not None: + if trailer[3] is not None: fmsg = trailer[3] for attestor in fmsg.attestors: # noqa if attestor.passing: -- cgit v1.2.3