twotalesanimation b120415d53 Task 10: Harden file upload validation
Enhanced validateFileUpload() function in functions.php with comprehensive security:
- Hardcoded MIME type whitelist per file type (profile_picture, proof_of_payment, document)
- Strict file size limits per type (5MB images, 10MB documents)
- Extension validation against whitelist
- Double extension prevention (e.g., shell.php.jpg)
- MIME type verification using finfo
- Image validation with getimagesize()
- is_uploaded_file() verification
- Random filename generation to prevent path traversal

Updated file upload handlers:
- upload_profile_picture.php - Profile picture uploads (JPEG, PNG, GIF, WEBP, 5MB max)
- submit_pop.php - Proof of payment uploads (PDF only, 10MB max) + CSRF validation + audit logging
- add_campsite.php - Campsite thumbnail uploads + input validation + CSRF validation + audit logging

Security improvements:
- All uploads use random filenames to prevent directory traversal
- All uploads use secure file permissions (0644)
- File validation occurs before move_uploaded_file()
- Comprehensive error logging for failed uploads
- Audit logging for successful file operations
2025-12-03 13:30:45 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-07-24 07:20:51 +02:00
2025-05-23 14:31:07 +02:00
2025-06-13 10:22:14 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-12-03 13:26:57 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-05-23 14:19:25 +02:00
2025-07-24 07:20:51 +02:00
2025-04-18 10:32:42 +02:00
2025-07-24 07:20:51 +02:00
2025-04-18 10:32:42 +02:00
2025-06-08 16:29:50 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-12-03 13:26:57 +02:00
2025-12-03 13:26:57 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 11:50:53 +02:00
2025-05-23 11:50:53 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 11:50:53 +02:00
2025-04-18 10:32:42 +02:00
2025-12-03 13:26:57 +02:00
2025-05-23 11:50:53 +02:00
2025-07-24 07:20:51 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-12-03 13:26:57 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-12-02 18:17:20 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-12-03 13:26:57 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-06-08 16:29:50 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:19:25 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-07-24 07:20:51 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-07-24 07:20:51 +02:00
2025-12-03 13:26:57 +02:00
2025-05-23 14:25:27 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:31:07 +02:00
2025-12-03 13:26:57 +02:00
2025-07-24 07:20:51 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
Description
No description provided
168 MiB
Languages
PHP 61.8%
CSS 26.1%
Sass 5.5%
HTML 4.4%
JavaScript 1.1%
Other 1.1%