Skip to content

fix: return 400 on invalid Stellar address in backend routes #443

@ryzen-xp

Description

@ryzen-xp

Description

Several backend routes accept a Stellar public key as a path or query param but do not validate its format, leading to confusing on-chain errors. Add format validation and return HTTP 400 early when the address is invalid.

Requirements

  • Validate Stellar address format (starts with G, 56 chars) in affected routes
  • Return 400 with a descriptive message on invalid input
  • Add tests for valid and invalid address inputs

Acceptance Criteria

  • Invalid Stellar addresses rejected with 400
  • Valid addresses pass through unchanged
  • Tests added and passing

Expected files to change

  • backend/src/stellar/stellar.controller.ts
  • backend/src/vault/vault.controller.ts
  • backend/src/auth/auth.controller.ts

Commit: fix: return 400 on invalid Stellar address in backend routes
Branch: fix/backend-stellar-address-validation | Priority: MEDIUM | Difficulty: one-coffee

Metadata

Metadata

Labels

stellar waveThis issue listed on Drip stellar wave contest

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions