Skip to content

Add input sanitization for query and path parameters #373

Description

@therealjhay

Current behavior:
Body sanitization exists but query parameters and path params are not sanitized for control characters.

Expected behavior:
Add preHandler hook that sanitizes all req.query and req.params string values: remove null bytes (\x00), newlines, other ASCII control characters (0x00–0x1F except \t). Log warning when sanitization applied.

Files to modify:

  • services/api-gateway/src/index.ts — add sanitization hook

Test requirements:

  1. Send query param with null byte — sanitized, warning logged.
  2. Send clean query param — no warning.

Acceptance criteria:

  • Control characters removed from query and path params.
  • No impact on legitimate requests.

Metadata

Metadata

Assignees

Labels

BackendStellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions