Skip to content

fix: sanitize queryActions input to prevent injection and DoS#49

Merged
tekwani merged 2 commits intotetherto:developfrom
mukama:fix/TDEBT-38-query-injection
Apr 13, 2026
Merged

fix: sanitize queryActions input to prevent injection and DoS#49
tekwani merged 2 commits intotetherto:developfrom
mukama:fix/TDEBT-38-query-injection

Conversation

@mukama
Copy link
Copy Markdown
Contributor

@mukama mukama commented Apr 10, 2026

Summary

  • Add maxLength constraints to suffix (200) and queries (10000) in route schemas
  • Validate queries is an array and cap length at 50 in handler
  • Fastify rejects oversized input at the HTTP boundary before reaching RPC

Add maxLength constraints to suffix (200) and queries (10000) in route
schemas, validate queries array type and cap length at 50 in handler.
@mukama mukama changed the title fix: sanitize queryActions input to prevent injection and DoS (TDEBT-38) fix: sanitize queryActions input to prevent injection and DoS Apr 10, 2026
Reduce queries string maxLength from 10000 to 1000 and cap the array at
10 items (previously 50). Extract both limits to named constants.
@tekwani tekwani merged commit c841021 into tetherto:develop Apr 13, 2026
6 checks passed
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.

3 participants