🚀 Description
User-provided input is directly inserted into the database without proper backend validation or sanitization.
This can lead to stored XSS vulnerabilities, malformed data, and database pollution.
📍Affected Files
backend/controllers/chat.controller.js
backend/controllers/tasks.controller.js
❌ Current Problem
Data is directly inserted like:
.insert([{ text, username, image, audio }])
and:
.insert([{ title, description, status, position }])
without proper sanitization or validation.
✅ Expected Solution
Implement backend-side validation and sanitization using:
- Joi/Zod validation
- sanitize-html
- input length checks
- required field validation
🎯 Expected Outcome
- Cleaner database entries
- Prevention of malicious payloads
- Better API reliability
🏷️ Expected Labels
level3 NSoC'26
🚀 Description
User-provided input is directly inserted into the database without proper backend validation or sanitization.
This can lead to stored XSS vulnerabilities, malformed data, and database pollution.
📍Affected Files
backend/controllers/chat.controller.jsbackend/controllers/tasks.controller.js❌ Current Problem
Data is directly inserted like:
and:
without proper sanitization or validation.
✅ Expected Solution
Implement backend-side validation and sanitization using:
🎯 Expected Outcome
🏷️ Expected Labels
level3NSoC'26