Skip to content

implemented the Campaign Budget Threshold Alerts feature.#376

Open
memplethee-lab wants to merge 7 commits intoPulsefy:mainfrom
memplethee-lab:main
Open

implemented the Campaign Budget Threshold Alerts feature.#376
memplethee-lab wants to merge 7 commits intoPulsefy:mainfrom
memplethee-lab:main

Conversation

@memplethee-lab
Copy link
Copy Markdown
Contributor

@memplethee-lab memplethee-lab commented Apr 25, 2026

Closes #245;

Closes #258

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 25, 2026

@memplethee-lab Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Cedarich
Copy link
Copy Markdown
Contributor

@memplethee-lab

@memplethee-lab
Copy link
Copy Markdown
Contributor Author

@Cedarich

- Add comprehensive file upload security validation
  * Enforce 10MB maximum file size
  * Whitelist 8 allowed MIME types (images, PDFs, documents)
  * Whitelist 9 allowed file extensions
  * Reject path traversal attempts (.., /, \)
  * Block null byte injection
  * Enforce single file upload only
  * Validate filename safety (max 255 chars, no empty names)

- Create multer configuration with security options
  * Centralized upload validation in multer.config.ts
  * Export validation functions for unit testing
  * Proper TypeScript typing for error handling

- Add comprehensive test coverage
  * 17 unit tests for validation functions (all passing)
  * 22 e2e tests for boundary and security scenarios
  * Tests for malicious file rejection (.exe, .php, .js, .bat)
  * Tests for path traversal prevention
  * Tests for file size boundaries

- Fix linting errors
  * Remove unused User import from budget-alerts.service.ts
  * Fix unsafe any type in handleMulterError function
  * Add eslint-disable comments for Jest mock methods
  * Apply Prettier formatting to all new files

- Update dependencies
  * Add multer ^1.4.5-lts.1 to backend package.json

Security improvements:
  ✅ File size limit enforcement
  ✅ MIME type validation
  ✅ File extension validation
  ✅ Path traversal protection
  ✅ Multiple file upload prevention
  ✅ Null byte injection protection
  ✅ Filename length validation

Closes Pulsefy#245
@Cedarich
Copy link
Copy Markdown
Contributor

Please fix failing test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harden Form Upload Validation and Limits Signed Artifact Access for Verification Evidence

2 participants