php - 我可以信任 $_FILES 的文件类型吗?

标签 php security upload

上传图片时,我可以信任来自 $_FILES 的文件类型吗?还是我必须再次检查 exif_imagetype()

最佳答案

来自documentation :

The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.

关于php - 我可以信任 $_FILES 的文件类型吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7308723/

相关文章:

authentication - 为什么要使用 API key 和 secret ?

java - 使用android将图像上传到apache tomcat服务器

security - 我应该如何将开发和/或测试版网站与公众和搜索引擎机器人隔离开来?

android - 上传图片到服务器

javascript - 可以从文件上传输入获取文件 data/val 并使用 Ajax 请求将其发送到服务器

php - jQuery 函数在 IE 中被触发两次...?

java - 从谷歌应用程序引擎发送post请求到php

PHP变量替换

php - 正则表达式查找所有 URL 和标题

java - 易于实现的 Web SSO 解决方案?