feat(backend): sanitize queue inputs and handle 409 duplicate slugs (#183) - #223
Open
stayzappy wants to merge 1 commit into
Open
Conversation
|
@stayzappy is attempting to deploy a commit to the Deejah Team on Vercel. A member of the Team first needs to authorize it. |
stayzappy
force-pushed
the
feature/issue-183-queue-input-sanitization
branch
2 times, most recently
from
August 31, 2026 09:38
57a3a33 to
306b5f9
Compare
stayzappy
force-pushed
the
feature/issue-183-queue-input-sanitization
branch
from
August 31, 2026 17:42
306b5f9 to
1139c1d
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #183
Summary of Changes (Closes #183)
1. Slug Validation & Length Restrictions
/^[a-zA-Z0-9-]+$/and max length of 9 characters onslugfield inCreateQueueSchemainsidebackend/src/routes/queues.ts.2. HTML & XSS Protection
/<[^>]*>/) in bothnameanddescriptionfields during queue creation.3. Duplicate Conflict Handling
POST /api/queues, returning HTTP status 409 Conflict.4. Unit Tests
backend/src/__tests__/queueSanitization.test.tsverifying valid payloads, slug length/character rules, HTML tag rejection, and duplicate slug 409 conflict handling.Verification
npx vitest run queueSanitization-> 6 passed, 0 failed.