fix: log the plugin archive hash mismatches - #80
Merged
Merged
Conversation
mmatur
force-pushed
the
fix/download-hash-sync
branch
from
August 27, 2026 14:27
fa94486 to
f6c7365
Compare
mmatur
force-pushed
the
fix/download-hash-sync
branch
from
August 27, 2026 14:37
f6c7365 to
53de3f3
Compare
mmatur
force-pushed
the
fix/download-hash-sync
branch
from
August 27, 2026 14:39
53de3f3 to
0cfa68e
Compare
mloiseleur
approved these changes
Aug 27, 2026
mloiseleur
left a comment
Member
There was a problem hiding this comment.
LGTM.
Non-blocking finding: unbounded client_hash on a public endpoint.
Header is unbounded (Go default MaxHeaderBytes = 1 MB), so it would be better to truncate it.
mmatur
force-pushed
the
fix/download-hash-sync
branch
from
September 14, 2026 08:59
0cfa68e to
6d2ab3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When the archive served by
/downloadstops matching the hash recorded on the first download,/validaterejects it and Traefik disables all the plugins:Nothing on the service side says so.
/validateanswers 404 without a word, and the only log about it, on/download, saysSomeone is trying to hack the archive, which is misleading: the client is honest, the archive it received simply is not the recorded one.It happened on
github.com/fosrl/badger, where every version fromv1.6.0on was served with a hash different from the recorded one. Archives are fetched from the Go proxy or from GitHub on each download, and they are not guaranteed to be byte-for-byte stable for a given version: the same content compressed differently is enough to change the sha256.How
Both places now log the recorded hash and the one the client reports. Nothing else changes:
/downloadkeeps streaming the archive without hashing it, and the recorded hash stays immutable.This only makes the drift visible. Fixing an affected version still requires recomputing its record.
Refs traefik/traefik#13771, traefik/piceus#156