Jessica Rynkar
5695d22a46
fix: execute mimetype validation on the file buffer data ( #13117 )
...
### What
Introduces an additional `mimeType` validation based on the actual file
data to ensure the uploaded file matches the allowed `mimeTypes` defined
in the upload config.
### Why?
The current validation relies on the file extension, which can be easily
manipulated. For example, if only PDFs are allowed, a JPEG renamed to
`image.pdf` would bypass the check and be accepted. This change prevents
such cases by verifying the true MIME type.
### How?
Performs a secondary validation using the file’s binary data (buffer),
providing a more reliable MIME type check.
Fixes #12905
2025-07-11 16:56:55 +01:00
..
2025-07-03 21:47:16 +00:00
2025-07-09 13:59:22 +00:00
2025-07-10 03:10:37 -07:00
2025-05-19 12:36:40 -03:00
2025-07-09 10:39:02 -04:00
2024-11-16 15:30:05 -05:00
2025-06-05 09:19:19 -07:00
2025-07-10 12:13:01 -04:00
2025-04-08 17:25:29 -03:00
2025-05-19 12:36:40 -03:00
2025-06-30 21:12:26 -04:00
2025-06-05 09:19:19 -07:00
2025-06-19 09:18:29 +00:00
2025-06-05 09:19:19 -07:00
2025-05-19 12:36:40 -03:00
2025-06-05 09:19:19 -07:00
2025-07-10 16:49:12 +03:00
2025-06-05 09:19:19 -07:00
2025-05-19 12:36:40 -03:00
2025-05-19 12:36:40 -03:00
2025-05-19 12:36:40 -03:00
2025-06-05 09:19:19 -07:00
2025-05-19 12:36:40 -03:00
2025-05-19 12:36:40 -03:00
2025-07-09 13:59:22 +00:00
2025-06-05 09:19:19 -07:00
2025-06-10 11:56:28 -04:00
2025-06-05 09:19:19 -07:00
2025-06-30 21:12:26 -04:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-05-19 12:36:40 -03:00
2025-07-09 13:59:22 +00:00
2025-06-11 06:23:22 -07:00
2025-05-28 16:50:47 -03:00
2024-10-30 17:56:50 +00:00
2025-07-11 14:26:48 +00:00
2025-07-07 14:02:55 -04:00
2025-05-19 12:36:40 -03:00
2025-07-03 21:47:16 +00:00
2025-07-09 13:59:22 +00:00
2025-05-19 12:36:40 -03:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-05-19 12:36:40 -03:00
2025-05-19 12:36:40 -03:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-07-09 15:46:48 -04:00
2025-06-30 17:18:41 -04:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-06-05 09:19:19 -07:00
2025-06-16 07:58:03 -04:00
2025-07-01 15:55:16 -04:00
2025-06-30 21:25:29 +03:00
2025-07-10 17:44:05 +00:00
2025-06-27 09:13:52 -04:00
2025-06-26 06:40:18 -04:00
2025-07-10 08:00:26 -07:00
2025-07-10 08:00:26 -07:00
2025-07-10 08:00:26 -07:00
2025-07-10 08:00:26 -07:00
2025-07-10 08:00:26 -07:00
2025-06-29 14:20:54 -04:00
2025-07-11 16:56:55 +01:00
2025-07-02 15:11:38 -04:00
2025-06-04 17:34:37 -03:00
2025-06-05 22:01:55 -03:00
2024-12-31 09:14:56 -05:00
2025-06-17 09:10:42 -04:00
2025-06-09 19:09:52 +00:00
2024-12-19 11:08:17 -05:00
2025-03-05 19:14:35 +00:00
2025-07-03 21:47:16 +00:00
2024-11-11 13:59:05 -05:00
2025-02-17 19:50:32 +00:00
2024-12-17 14:49:29 -05:00
2025-03-11 09:45:13 -06:00
2025-07-02 19:24:53 +03:00
2025-02-07 03:24:49 +00:00
2025-06-05 22:01:55 -03:00
2025-03-05 19:14:35 +00:00
2025-05-12 09:41:18 -04:00
2025-02-14 00:08:20 +00:00
2025-01-14 20:00:00 -03:00
2025-03-05 19:14:35 +00:00