Skip to content

Whitespace-only sender/body/orderId pass truthiness guards #10

Description

@royalpinto007

Problem

Whitespace-only sender/body pass the truthiness guard and reach triage/storage; whitespace orderId passes the policy check then looks up garbage downstream.

Where

app/api/inbound/route.ts (if (!body.sender || !body.body)) + lib/policy.ts (if (!payload.orderId)).

Acceptance

Add a failing test first asserting POST /api/inbound {sender: " ", body: " "} returns 400 and decide with orderId: " " escalates for a missing order number. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions