Skip to content

fix(puffin): reject trailing data in footer payloads - #1580

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/puffin-footer-trailing-data
Open

fix(puffin): reject trailing data in footer payloads#1580
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/puffin-footer-trailing-data

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

After decoding the Puffin footer object, require the bounded footer payload reader to contain only JSON whitespace before EOF.

Why

A single json.Decoder.Decode call accepted the first JSON value and silently ignored a second value or non-whitespace garbage, even though the trailer declared those bytes as part of the footer payload.

Unknown fields within the footer object remain allowed for forward compatibility.

Testing

  • go test ./puffin
  • go vet ./puffin

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 28, 2026 17:18
Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
@fallintoplace
fallintoplace force-pushed the fix/puffin-footer-trailing-data branch from 099c19a to 02e5987 Compare August 1, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant