From 1ae0568a41fa789a35d13a8f5a6f150771ac7589 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 28 四月 2026 09:11:23 +0800
Subject: [PATCH] 1

---
 WebAPI/Service/SignatureVerifyAttribute.cs |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Service/SignatureVerifyAttribute.cs b/WebAPI/Service/SignatureVerifyAttribute.cs
index e610a7a..8f24798 100644
--- a/WebAPI/Service/SignatureVerifyAttribute.cs
+++ b/WebAPI/Service/SignatureVerifyAttribute.cs
@@ -6,6 +6,7 @@
 using System.Web.Http;
 using System.Web.Http.Controllers;
 using System.Web.Http.Filters;
+using WebAPI;
 using WebAPI.Service;
 
 namespace project.Filter
@@ -53,7 +54,6 @@
             }
             var currentTs = (DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds;
             var diff = Math.Abs(currentTs - ts);
-
             if (diff > 300) // 300绉� = 5鍒嗛挓
             {
                 actionContext.Response = actionContext.Request.CreateResponse(System.Net.HttpStatusCode.BadRequest,
@@ -87,10 +87,9 @@
             }
             rawData = rawData.Replace("'", "%27");
             var signStr = rawData + "&timestamp=" + timestamp + "&nonce=" + nonce + "&key=" + SecretKey;
-
             var serverSign = ComputeHmacSha256(signStr, SecretKey);
 
-
+            
             if (serverSign != clientSign.ToUpper())
             {
                 actionContext.Response = actionContext.Request.CreateResponse(System.Net.HttpStatusCode.Unauthorized,

--
Gitblit v1.9.1