Skip to content

xdr: add SafeUnmarshalBase64WithOptions and regenerate#5916

Merged
tamirms merged 1 commit intostellar:mainfrom
tamirms:fix-allocation
Mar 13, 2026
Merged

xdr: add SafeUnmarshalBase64WithOptions and regenerate#5916
tamirms merged 1 commit intostellar:mainfrom
tamirms:fix-allocation

Conversation

@tamirms
Copy link
Copy Markdown
Contributor

@tamirms tamirms commented Mar 11, 2026

Summary

  • Add SafeUnmarshalBase64WithOptions accepting DecodeOptions (including MaxOutputBytes) while setting safe defaults for MaxInputLen and MaxDepth
  • Re-export DecodeOptions as a type alias so callers do not need to import go-xdr directly
  • Regenerate xdr_generated.go with output size tracking from updated xdrgen

🤖 Generated with Claude Code

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 11, 2026

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub.com/​stellar/​go-xdr@​v0.0.0-20231122183749-b53fb00bcac2 ⏵ v0.0.0-20260312225820-cc2b0611aabf98 +1100100100100

View full report

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 11, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@tamirms tamirms force-pushed the fix-allocation branch 4 times, most recently from 3a8e409 to bfeb789 Compare March 12, 2026 23:53
@tamirms tamirms marked this pull request as ready for review March 12, 2026 23:56
Copilot AI review requested due to automatic review settings March 12, 2026 23:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the SDK’s XDR decoding helpers to support caller-specified decode limits/options (via a new SafeUnmarshalBase64WithOptions) and updates the repository’s go-xdr/xdrgen inputs and Go toolchain targets accordingly.

Changes:

  • Add SafeUnmarshalBase64WithOptions and re-export DecodeOptions for consumers.
  • Update go-xdr dependency and xdrgen commit reference.
  • Bump Go versions in go.mod and GitHub Actions workflow matrices.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
xdr/main.go Adds SafeUnmarshalBase64WithOptions, re-exports DecodeOptions, and adjusts base64/hex safe-unmarshal option initialization.
go.mod Bumps Go version and updates github.com/stellar/go-xdr requirement.
go.sum Updates checksums for the new go-xdr pseudo-version.
Makefile Updates the pinned XDRGEN_COMMIT used for regeneration.
.github/workflows/go.yml Updates CI Go version matrices (including adding 1.26).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread xdr/main.go Outdated
Comment thread xdr/main.go Outdated
Comment thread xdr/main.go Outdated
Comment thread xdr/main.go Outdated
…ze tracking

Add SafeUnmarshalBase64WithOptions to accept DecodeOptions (including
MaxOutputBytes) while always setting safe defaults for MaxInputLen and
MaxDepth. Re-export DecodeOptions as a type alias so callers do not
need to import go-xdr directly. Regenerate xdr_generated.go with
output size tracking calls from updated xdrgen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tamirms tamirms merged commit 685d414 into stellar:main Mar 13, 2026
11 checks passed
@tamirms tamirms deleted the fix-allocation branch March 13, 2026 01: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.

4 participants