Skip to content

fix: Webhook event payload truncation corrupts binary data #127

Description

@dotunv

Bug Description

The webhook event payload truncation logic cuts off binary data (such as serialized ScVal bytes) at a fixed character limit without considering UTF-8 or binary boundaries. This corrupts the payload, making it impossible to decode the truncated portion.

Expected Behavior

Truncation should respect binary/UTF-8 character boundaries and append a truncation marker indicating data was cut.

Actual Behavior

Binary payloads are cut at an arbitrary byte position, corrupting the remaining data and making JSON parsing of the truncated payload fail.

Steps to Reproduce

  1. Send a webhook with a ScVal binary payload exceeding the truncation limit
  2. Check the stored webhook event in the database
  3. Attempt to parse the truncated payload — JSON parse error

Impact

Webhook events with large binary payloads are stored in an unusable state, preventing debugging and replay.

Labels

bug, backend, Maybe Rewarded, GrantFox OSS, Official Campaign

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend / API workbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions