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
- Send a webhook with a ScVal binary payload exceeding the truncation limit
- Check the stored webhook event in the database
- 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
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
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