diff --git a/projects/Infrastructure/Email/EmailSender.cs b/projects/Infrastructure/Email/EmailSender.cs index bd8a32f1..4f6528d7 100644 --- a/projects/Infrastructure/Email/EmailSender.cs +++ b/projects/Infrastructure/Email/EmailSender.cs @@ -1,11 +1,11 @@ -using MailKit.Net.Smtp; +锘縰sing MailKit.Net.Smtp; using MimeKit; namespace Infrastructure.Email { public class EmailSender : IEmailSender { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5359:请勿禁用证书验证", Justification = "<挂起>")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5359:璇峰嬁绂佺敤璇佷功楠岃瘉", Justification = "<鎸傝捣>")] public void SendMail(string name, string from, string to, diff --git a/projects/Infrastructure/Extensions/Md5Extensions.cs b/projects/Infrastructure/Extensions/Md5Extensions.cs index 4747c537..47238c98 100644 --- a/projects/Infrastructure/Extensions/Md5Extensions.cs +++ b/projects/Infrastructure/Extensions/Md5Extensions.cs @@ -1,4 +1,4 @@ -using System; +锘縰sing System; using System.Globalization; using System.IO; using System.Security.Cryptography; @@ -8,7 +8,7 @@ namespace Infrastructure.Extensions { public static class Md5Extensions { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5351:不要使用损坏的加密算法", Justification = "<挂起>")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5351:涓嶈浣跨敤鎹熷潖鐨勫姞瀵嗙畻娉", Justification = "<鎸傝捣>")] public static string Md5(this Stream input) { using MD5 md5 = MD5.Create(); @@ -16,7 +16,7 @@ namespace Infrastructure.Extensions return BitConverter.ToString(hash).Replace("-", string.Empty, StringComparison.CurrentCulture).ToLower(CultureInfo.CurrentCulture); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5351:不要使用损坏的加密算法", Justification = "<挂起>")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5351:涓嶈浣跨敤鎹熷潖鐨勫姞瀵嗙畻娉", Justification = "<鎸傝捣>")] public static string Md5(this string input) { using MD5 md5 = MD5.Create(); diff --git a/projects/Infrastructure/Extensions/StringExtensions.cs b/projects/Infrastructure/Extensions/StringExtensions.cs index c777adc6..0551981c 100644 --- a/projects/Infrastructure/Extensions/StringExtensions.cs +++ b/projects/Infrastructure/Extensions/StringExtensions.cs @@ -1,4 +1,4 @@ -using HtmlAgilityPack; +锘縰sing HtmlAgilityPack; using System; using System.Globalization; using System.Linq; @@ -69,7 +69,7 @@ namespace Infrastructure.Extensions return Enumerable.Range(0, hex.Length / 2).Select(x => Convert.ToByte(hex.Substring(x * 2, 2), 16)).ToArray(); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5351:不要使用损坏的加密算法", Justification = "<挂起>")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5351:涓嶈浣跨敤鎹熷潖鐨勫姞瀵嗙畻娉", Justification = "<鎸傝捣>")] public static string DESEncrypt(this string value, string key) { using var des = new DESCryptoServiceProvider(); @@ -89,7 +89,7 @@ namespace Infrastructure.Extensions return ret.ToString(); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5351:不要使用损坏的加密算法", Justification = "<挂起>")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5351:涓嶈浣跨敤鎹熷潖鐨勫姞瀵嗙畻娉", Justification = "<鎸傝捣>")] public static string DESDecrypt(this string value, string key) { if (value is null) @@ -116,9 +116,9 @@ namespace Infrastructure.Extensions public static Guid ToGuid(this string input) { -#pragma warning disable CA5351 // 不要使用损坏的加密算法 +#pragma warning disable CA5351 // 涓嶈浣跨敤鎹熷潖鐨勫姞瀵嗙畻娉 using MD5 md5 = MD5.Create(); -#pragma warning restore CA5351 // 不要使用损坏的加密算法 +#pragma warning restore CA5351 // 涓嶈浣跨敤鎹熷潖鐨勫姞瀵嗙畻娉 var hash = md5.ComputeHash(Encoding.UTF8.GetBytes(input)); var guid = new Guid(hash); //list.Add(input, guid.ToString()); diff --git a/projects/Infrastructure/Security/EncryptionService.cs b/projects/Infrastructure/Security/EncryptionService.cs index 5b42cfb6..6c65c204 100644 --- a/projects/Infrastructure/Security/EncryptionService.cs +++ b/projects/Infrastructure/Security/EncryptionService.cs @@ -1,4 +1,4 @@ -using Infrastructure.Extensions; +锘縰sing Infrastructure.Extensions; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using System; @@ -16,7 +16,7 @@ namespace Infrastructure.Security this._configuration = configuration; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5350:不要使用弱加密算法", Justification = "<挂起>")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5350:涓嶈浣跨敤寮卞姞瀵嗙畻娉", Justification = "<鎸傝捣>")] public string CreatePasswordHash(string password, string saltkey) { var saltAndPassword = String.Concat(password, saltkey); diff --git a/projects/Infrastructure/Sms/NetEasySmsSender.cs b/projects/Infrastructure/Sms/NetEasySmsSender.cs index e0ddb6db..0b5c2bd1 100644 --- a/projects/Infrastructure/Sms/NetEasySmsSender.cs +++ b/projects/Infrastructure/Sms/NetEasySmsSender.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Configuration; +锘縰sing Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; @@ -36,9 +36,9 @@ namespace Infrastructure.Sms { try { -#pragma warning disable CA2000 // 丢失范围之前释放对象 +#pragma warning disable CA2000 // 涓㈠け鑼冨洿涔嬪墠閲婃斁瀵硅薄 var client = this._httpClientFactory.CreateClient(); -#pragma warning restore CA2000 // 丢失范围之前释放对象 +#pragma warning restore CA2000 // 涓㈠け鑼冨洿涔嬪墠閲婃斁瀵硅薄 var formData = new List> { new KeyValuePair("AppKey", this._appKey), @@ -48,9 +48,9 @@ namespace Infrastructure.Sms formData.Add(new KeyValuePair("CurTime", seconds)); var sumValue = string.Format(CultureInfo.InvariantCulture, "{0}{1}{2}", this._appSecret, formData[1].Value, formData[2].Value); var sumBytes = Encoding.UTF8.GetBytes(sumValue); -#pragma warning disable CA5350 // 不要使用弱加密算法 +#pragma warning disable CA5350 // 涓嶈浣跨敤寮卞姞瀵嗙畻娉 using var sha1 = SHA1.Create(); -#pragma warning restore CA5350 // 不要使用弱加密算法 +#pragma warning restore CA5350 // 涓嶈浣跨敤寮卞姞瀵嗙畻娉 var sumHash = sha1.ComputeHash(sumBytes); var hashValue = string.Empty; var builder = new StringBuilder(); diff --git a/projects/Infrastructure/UI/FileConfigureOptions.cs b/projects/Infrastructure/UI/FileConfigureOptions.cs index 13b01265..5e462d3e 100644 --- a/projects/Infrastructure/UI/FileConfigureOptions.cs +++ b/projects/Infrastructure/UI/FileConfigureOptions.cs @@ -1,4 +1,4 @@ -using System; +锘縰sing System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -38,9 +38,9 @@ namespace Infrastructure.UI options.ContentTypeProvider = contentTypeProvider; if (options.FileProvider == null && Environment.WebRootFileProvider == null) { -#pragma warning disable CA1303 // 请不要将文本作为本地化参数传递 +#pragma warning disable CA1303 // 璇蜂笉瑕佸皢鏂囨湰浣滀负鏈湴鍖栧弬鏁颁紶閫 throw new InvalidOperationException("Missing FileProvider."); -#pragma warning restore CA1303 // 请不要将文本作为本地化参数传递 +#pragma warning restore CA1303 // 璇蜂笉瑕佸皢鏂囨湰浣滀负鏈湴鍖栧弬鏁颁紶閫 } if (this._providers == null) { diff --git a/projects/Infrastructure/Views/Shared/EditorTemplates/AjaxSelect.cshtml b/projects/Infrastructure/Views/Shared/EditorTemplates/AjaxSelect.cshtml index 56efed94..7a4bf69f 100644 --- a/projects/Infrastructure/Views/Shared/EditorTemplates/AjaxSelect.cshtml +++ b/projects/Infrastructure/Views/Shared/EditorTemplates/AjaxSelect.cshtml @@ -1,5 +1,5 @@ -@{ +锘緻{ var htmlClass = "form-control select2bs4 search"; var list = (ViewData[ViewData.ModelMetadata.PropertyName + "SelectList"] as SelectList) ?? new SelectList(new List()); - @Html.DropDownList("", list, "请选择", new { @class = htmlClass }) + @Html.DropDownList("", list, "璇烽夋嫨", new { @class = htmlClass }) } \ No newline at end of file