aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-14 12:34:37 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-14 12:34:37 -0400
commit681623ed6122bf69a5055d173cc5521da672adf9 (patch)
treee97e867b2ea36cb29ccfac8ca3a3ae06934365e3
parentcc4639d5fe6d73eb03678d486d038eb43705e83d (diff)
downloadb4-681623ed6122bf69a5055d173cc5521da672adf9.tar.gz
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 <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py5
1 files 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: