Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
szpt
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
以墨为白
szpt
Commits
ded60957
Commit
ded60957
authored
Jan 09, 2025
by
以墨为白
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3960d3fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/main/java/com/zksy/szpt/filter/SignatureVerificationFilter.java
...ava/com/zksy/szpt/filter/SignatureVerificationFilter.java
+2
-2
No files found.
src/main/java/com/zksy/szpt/filter/SignatureVerificationFilter.java
View file @
ded60957
...
...
@@ -94,7 +94,7 @@ public class SignatureVerificationFilter extends OncePerRequestFilter {
// 防止请求重放,nonce只能用一次,放在redis中,有效期 20分钟
String
nonceKey
=
"api_signature:nonce:"
+
nonce
;
if
(
Boolean
.
FALSE
.
equals
(
this
.
redisTemplate
.
opsForValue
().
setIfAbsent
(
nonceKey
,
"1"
,
20
,
TimeUnit
.
MINUTES
)))
{
this
.
write
(
response
,
"nonce无效
"
);
this
.
write
(
response
,
"nonce无效
:"
+
nonce
);
return
false
;
}
...
...
@@ -102,7 +102,7 @@ public class SignatureVerificationFilter extends OncePerRequestFilter {
AppStore
appStore
=
this
.
appStoreService
.
getAppSecretInfo
(
appId
);
String
appSecret
=
appStore
.
getAppSecret
();
if
(!
StringUtils
.
hasText
(
appSecret
))
{
this
.
write
(
response
,
"appId无效
"
);
this
.
write
(
response
,
"appId无效
:"
+
appId
);
return
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment