refactor(api): enhance donation creation with rate limiting, Zod validation, and secure logging

- Add rate limiting to prevent abuse on /api/donations/create endpoint
- Replace manual input validation with Zod schema for better error handling and type safety
- Switch from console.log to secureLogger to comply with LGPD and avoid exposing sensitive data
- Remove sensitive request body logging in AbacatePay client for improved security
This commit is contained in:
Evandro Fonseca Junior committed 2025-10-26 23:01:19 -03:00
1 parent bb6b320d1f
commit a1800227a7
11 files changed
+876 -138

No files matched your search

+6 -1
View File
@@ -33,7 +33,10 @@
"react-dom": "19.1.0",
"react-qr-code": "^2.0.18",
"recharts": "^3.3.0",
"tailwind-merge": "^3.3.1"
"sanitize-html": "^2.17.0",
"tailwind-merge": "^3.3.1",
"validator": "^13.15.20",
"zod": "^4.1.12"
},
"devDependencies": {
"@biomejs/biome": "2.2.0",
@@ -41,6 +44,8 @@
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/sanitize-html": "^2.16.0",
"@types/validator": "^13.15.3",
"tailwindcss": "^4",
"tw-animate-css": "^1.3.7",
"typescript": "^5"