From 144bb625dbd541d32d26aeea1450bae3a2c62b41 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Fri, 26 Jul 2024 15:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8E=E5=8E=BB=E6=8E=89=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E9=AA=8C=E8=AF=81=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B4=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs b/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs index 7262700e..0a9ffa45 100644 --- a/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs +++ b/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs @@ -340,8 +340,8 @@ public class SysFileService : IDynamicApiController, ITransient // 防止客户端伪造文件类型 if (!string.IsNullOrWhiteSpace(allowSuffix) && !allowSuffix.Contains(suffix)) throw Oops.Oh(ErrorCodeEnum.D8003); - if (!VerifyFileExtensionName.IsSameType(file.OpenReadStream(), suffix)) - throw Oops.Oh(ErrorCodeEnum.D8001); + //if (!VerifyFileExtensionName.IsSameType(file.OpenReadStream(), suffix)) + // throw Oops.Oh(ErrorCodeEnum.D8001); var path = string.IsNullOrWhiteSpace(savePath) ? _uploadOptions.Path : savePath; path = path.ParseToDateTimeForRep();