From 37454e625df68d40897112b2e8c2e3cf4d7163e3 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期三, 25 三月 2026 11:43:10 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs"
index d047780..30ffd28 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs"
@@ -93,7 +93,7 @@
                     ms.Position = 0;
                     await ms.CopyToAsync(originalBody);
 
-                    if (!ignoreUrls.Any(x => context.Request.Path.Value?.Contains(x) ?? false))
+                    if (!ignoreUrls.Any(x => context.Request.Path.Value?.ToLower().Contains(x.ToLower()) ?? false))
                     {
                         Logger.Add(requestParam, responseParam);
                     }
@@ -124,6 +124,28 @@
             string bodyData = sr.ReadToEndAsync().Result;
             if (request.ContentLength <= 100000)
             {
+                if (context.Request.Path.Value?.ToLower().Contains("login") ?? false)
+                {
+                    Dictionary<string,object>? valuePairs = JsonConvert.DeserializeObject<Dictionary<string, object>>(bodyData);
+                    if (valuePairs != null)
+                    {
+                        if(valuePairs.ContainsKey("Password"))
+                            valuePairs["Password"] = "******";
+                        else if (valuePairs.ContainsKey("pwd"))
+                            valuePairs["pwd"] = "******";
+                        else if (valuePairs.ContainsKey("password"))
+                            valuePairs["password"] = "******";
+                        else if (valuePairs.ContainsKey("Pwd"))
+                            valuePairs["Pwd"] = "******";
+                        else if (valuePairs.ContainsKey("PASSWORD"))
+                            valuePairs["PASSWORD"] = "******";
+                        else if (valuePairs.ContainsKey("passWord"))
+                            valuePairs["passWord"] = "******";
+                        else if (valuePairs.ContainsKey("PassWord"))
+                            valuePairs["PassWord"] = "******";
+                        bodyData = JsonConvert.SerializeObject(valuePairs);
+                    }
+                }
                 obj = new
                 {
                     QueryString = request.QueryString.ToString(),

--
Gitblit v1.9.3