Is the application/octet-stream MIME type safe for uploading?
我们有一个服务器端 PHP 脚本来处理来自 Android 应用程序的文件上传。此脚本将 AMR 文件的 mime 类型标识为 application/octet-stream。我们有一个数组,其中包含一些脚本用来检查文件是否安全的 MIME 类型。我不确定是否将 application/octet-stream 添加到此数组中。安全吗?还是我们必须更彻底地检查这种类型的文件?如果是,怎么做?
- 请告诉我你的代码
-
我做了一些语法修复,并试图澄清你问题的语言。我还改进了格式。请不要以感叹号结尾。
application/octet-stream 仅表示”通用二进制”,因此它是否”安全”更多地取决于您对文件所做的操作 – 就像从用户那里接受的每种数据一样。
如果您只是存储文件以供以后下载,它是安全的。
来源:https://www.codenong.com/28915322/
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9944.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57