Commit Graph
4 Commits
Author SHA1 Message Date
gorkem-bwl 8b322a0ec0 feat: apply input sanitization to prevent XSS attacks
Enables comprehensive XSS protection by applying sanitization middleware
to all incoming requests. Uses the sanitization utilities added in previous PR.

Changes:
- Added sanitizeBody() and sanitizeQuery() middleware after express.json()
- Enhanced Content Security Policy headers for additional XSS protection
- Added 'object-src: none' and 'base-uri: self' directives
- All user inputs now automatically sanitized before processing

Security improvements:
- Prevents stored XSS attacks through HTML sanitization
- Recursive sanitization handles nested objects and arrays
- Maintains backward compatibility with existing functionality
- Strengthened CSP headers block unsafe content injection

Files changed: src/app.js (9 lines added)
Risk level: Medium (global middleware application)
2025-08-11 17:33:05 -04:00
Alex Holliday f3e50120ee appSettings -> envSettings 2025-07-28 14:37:18 -07:00
Alex Holliday ec99b5e9b4 add rate limiting 2025-07-28 12:00:09 -07:00
Alex Holliday 1c47c8ce2c move to src 2025-07-25 15:33:48 -07:00