Skip to content

chore: snapshots on R2 - backport to v2#17507

Merged
spypsy merged 3 commits intov2from
spy/r2-v2-backport
Oct 7, 2025
Merged

chore: snapshots on R2 - backport to v2#17507
spypsy merged 3 commits intov2from
spy/r2-v2-backport

Conversation

@spypsy
Copy link
Member

@spypsy spypsy commented Oct 6, 2025

Fixes A-23
Backporting:
#17115
#17434
#17511

const out = gunzipSync(data);
return out;
} catch {
// Fall through to return original if decompression fails
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey sorry for drive-by review - if we have a truncated gzip packet this may be a bit confusing as we'll just try it uncompressed, seems maybe better to just hard error?

Copy link
Member Author

@spypsy spypsy Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think that makes sense. But only if isGzipMagic is true I think as headers can lie.updating

Copy link
Collaborator

@ludamad ludamad Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah if we don't have the magic numbers arguably we should never try then (if we want to allow lying)

@spypsy spypsy marked this pull request as ready for review October 6, 2025 09:32
@spypsy spypsy requested a review from charlielye as a code owner October 6, 2025 09:32
@spypsy spypsy force-pushed the spy/r2-v2-backport branch from 890901a to e793a59 Compare October 6, 2025 10:54
@PhilWindle PhilWindle enabled auto-merge (squash) October 6, 2025 14:33
@PhilWindle PhilWindle disabled auto-merge October 6, 2025 14:33
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​aws-sdk/​client-s3@​3.901.09810010097100

View full report

@spypsy spypsy merged commit 4e9c93d into v2 Oct 7, 2025
6 checks passed
@spypsy spypsy deleted the spy/r2-v2-backport branch October 7, 2025 10:18
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.

4 participants