I’ve had my site pen tested, and one topic that came up was that I am not restricting the contenttype of files that are uploaded to my AWS S3 bucket… so a malicious executable could be uploaded which has an file extension of .jpg for example.
Does Wappler provide a way to restrict upload of specific file content type (so the actual content rather than just the extension)?
I believe Content-Type can be spoofed and cannot be trusted.
It’s my opinion restricting Content-Type doesn’t lead to significant security improvements, I wouldn’t worry about it.
“mime_content_type” and “exif_imagetype” should be used for identification purposes only, not for security purposes!
The above functions should not be used for security purposes because both of them allow spoofed files!