Skip to content

Fix checksum verification for mismatch algo types#3174

Open
patrickbrophy wants to merge 1 commit intoPelicanPlatform:mainfrom
patrickbrophy:fix-issue-3146
Open

Fix checksum verification for mismatch algo types#3174
patrickbrophy wants to merge 1 commit intoPelicanPlatform:mainfrom
patrickbrophy:fix-issue-3146

Conversation

@patrickbrophy
Copy link
Contributor

Closes #3146

When using an origin backed by the XRootD multiuser plugin, the client would crash with a strconv.ParseInt out-of-rangeerror when there was an algorithm mismatch. Additionally, even when the plugin would fallback to a supported algorithm, the client had no way to verify it because the client only computed explicitly requested checksums.

Changes:

  • Compute hashes for all known algorithms during transfer so the client can verify against whatever the server actually returns.
  • Add length validation for crc32/crc32c parsing to detect and skip mislabled checksums
  • Extract duplicated verfication logic from downloadObject/uploadObject into a shared helper function.
  • Request all known checksum types from the server via Want-Digest header to maximize chance of getting supported algorithm
  • Add unit test for algorithm fallback and mislabeled checksum scenarios.
  • Add integration test against real multiuser origin

When using an origin backed by the XRootD multiuser plugin,
the client would crash with a `strconv.ParseInt out-of-range`error when
there was an algorithm mismatch. Additionally, even when the plugin
would fallback to a supported algorithm, the client had no way to
verify it because the client only computed explicitly requested
checksums.

Changes:
- Compute hashes for all known algorithms during transfer so the client
  can verify against whatever the server actually returns.
- Add length validation for crc32/crc32c parsing to detect and skip
  mislabled checksums
- Extract duplicated verfication logic from downloadObject/uploadObject
  into a shared helper function.
- Request all known checksum types from the server via Want-Digest
  header to maximize chance of getting supported algorithm
- Add unit test for algorithm fallback and mislabeled checksum
  scenarios.
- Add integration test against real multiuser origin
@patrickbrophy patrickbrophy added bug Something isn't working client Issue affecting the OSDF client labels Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working client Issue affecting the OSDF client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected client errors when interacting with Multi-User Origin

1 participant