fix(tasks): add length validation to updateTask to match createTask limits [NSoC'26]#166
Open
anshul23102 wants to merge 1 commit into
Open
Conversation
…imits [NSoC'26] createTask validated that title does not exceed 200 characters and description does not exceed 5000 characters. updateTask had no length validation, so an authenticated user could bypass creation-time limits by sending an oversized payload to PATCH /tasks/:id/edit. Added the same validation guards to updateTask so both creation and update paths enforce consistent input limits before writing to Supabase. Closes Shriii19#162
|
@anshul23102 is attempting to deploy a commit to the shreemp194-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Thank you for opening this pull request! I will review your changes and assist you soon. |
5 tasks
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.
Description
createTaskvalidated thattitledoes not exceed 200 characters anddescriptiondoes not exceed 5000 characters.updateTaskhad no corresponding validation, allowing an authenticated user to bypass creation-time limits by sending an oversized payload toPATCH /tasks/:id/edit.Changes Made
backend/controllers/tasks.controller.jsupdateTaskTesting Done
PATCH /tasks/:id/editwithtitle: "A".repeat(201)returns 400.PATCH /tasks/:id/editwithdescription: "A".repeat(5001)returns 400.Checklist
Closes #162