Skip to content

fix(server): reject whitespace-only and non-string slug and title in POST /sandboxed - #387

Open
Ayush7614 wants to merge 1 commit into
CopilotKit:mainfrom
Ayush7614:fix/sandboxed-whitespace-validation
Open

fix(server): reject whitespace-only and non-string slug and title in POST /sandboxed#387
Ayush7614 wants to merge 1 commit into
CopilotKit:mainfrom
Ayush7614:fix/sandboxed-whitespace-validation

Conversation

@Ayush7614

Copy link
Copy Markdown
Contributor

POST /api/sandboxed accepted a whitespace-only or non-string slug/title: the truthiness guard let " " and 123 through, storing a blank title verbatim or failing later with a misleading error (or a 500 on a non-string title).

Rejects non-string and whitespace-only slug/title with 400 and trims both before save, mirroring the POST /servers/custom validation. Verified with an 8-case guard script (whitespace, numeric, null, padded inputs) and server typecheck.

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.

1 participant