Skip to content

fix: enforce 28-byte memo limit in send_payment and create_payment_request - #65

Open
DavidAkere204 wants to merge 1 commit into
StellarSend:mainfrom
DavidAkere204:fix/enforce-memo-length-49
Open

fix: enforce 28-byte memo limit in send_payment and create_payment_request#65
DavidAkere204 wants to merge 1 commit into
StellarSend:mainfrom
DavidAkere204:fix/enforce-memo-length-49

Conversation

@DavidAkere204

@DavidAkere204 DavidAkere204 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor
  • Add InvalidMemo = 26 variant to StellarSendError
  • Add MAX_MEMO_BYTES = 28 constant to stellar_send (mirrors Stellar classic MEMO_TEXT limit)
  • Reject memos exceeding MAX_MEMO_BYTES in send_payment via memo.len() > MAX_MEMO_BYTES guard
  • Reject memos exceeding MAX_MEMO_BYTES in create_payment_request with same guard
  • Update send_payment doc comment: 'recommended' → 'enforced'
  • Add test_send_payment_rejects_oversized_memo (29-byte memo → InvalidMemo)
  • Add test_send_payment_boundary_memo_succeeds (exactly 28 bytes → success)
  • Add test_create_payment_request_rejects_oversized_memo (500-byte memo → InvalidMemo)

Closes #49

…quest

- Add InvalidMemo = 26 variant to StellarSendError
- Add MAX_MEMO_BYTES = 28 constant to stellar_send (mirrors Stellar classic MEMO_TEXT limit)
- Reject memos exceeding MAX_MEMO_BYTES in send_payment via memo.len() > MAX_MEMO_BYTES guard
- Reject memos exceeding MAX_MEMO_BYTES in create_payment_request with same guard
- Update send_payment doc comment: 'recommended' → 'enforced'
- Add test_send_payment_rejects_oversized_memo (29-byte memo → InvalidMemo)
- Add test_send_payment_boundary_memo_succeeds (exactly 28 bytes → success)
- Add test_create_payment_request_rejects_oversized_memo (500-byte memo → InvalidMemo)

Closes StellarSend#49
@DavidAkere204 DavidAkere204 changed the title fix: enforce 28-byte memo limit in send_payment and create_payment_re… fix: enforce 28-byte memo limit in send_payment and create_payment_request Aug 16, 2026
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.

send_payment and create_payment_request accept unbounded memo strings despite a doc comment recommending a 28-byte maximum

1 participant