Secure User Image Upload Capabilities in PHP

后端 未结 4 1391
[愿得一人]
[愿得一人] 2020-12-01 14:45

I\'m implementing a user-based image uploading tool for my website. The system should allow any users to upload JPEG and PNG files only. I\'m, of course, worried about se

4条回答
  •  醉梦人生
    2020-12-01 15:31

    All the checks seem good, number 3 in particular. If performance is not an issue, or you are doing this in the background, you could try accessing the image using GD and seeing if it is indeed an image and not just a bunch of crap that someone is trying to fill your server with.

提交回复
热议问题