Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
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
head_group
xyqb-user2
Commits
a96fd08b
Commit
a96fd08b
authored
Jan 06, 2022
by
李健华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改token长度验证-yxm
parent
b1829ee8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
PasswordFreeAccessValidateAdvisor.java
.../xyqb/aspect/limit/PasswordFreeAccessValidateAdvisor.java
+4
-4
SessionServiceImpl.java
...ntgroup/xyqb/service/session/impl/SessionServiceImpl.java
+1
-1
No files found.
src/main/java/cn/quantgroup/xyqb/aspect/limit/PasswordFreeAccessValidateAdvisor.java
View file @
a96fd08b
...
...
@@ -81,10 +81,10 @@ public class PasswordFreeAccessValidateAdvisor {
}
// 当前请求的Token
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
if
(
StringUtils
.
length
(
token
)
!=
Constants
.
TOKEN_LENGTH
)
{
log
.
info
(
"非法请求 - 无效token, token={}, phoneNo={}, userId={}, clientIp={}"
,
token
,
phoneNo
,
userId
,
clientIp
);
return
false
;
}
//
if (StringUtils.length(token) != Constants.TOKEN_LENGTH) {
//
log.info("非法请求 - 无效token, token={}, phoneNo={}, userId={}, clientIp={}", token, phoneNo, userId, clientIp);
//
return false;
//
}
// 当前session
SessionStruct
session
=
XyqbSessionContextHolder
.
getXSessionFromRedis
(
token
);
...
...
src/main/java/cn/quantgroup/xyqb/service/session/impl/SessionServiceImpl.java
View file @
a96fd08b
...
...
@@ -82,7 +82,7 @@ public class SessionServiceImpl implements ISessionService {
SessionStruct
sessionStruct
;
//获取sessionid
String
sessionId
=
findSessionIdByUserIdLoginProperties
(
user
.
getId
(),
properties
);
if
(
StringUtils
.
length
(
sessionId
)
==
Constants
.
TOKEN_LENGTH
)
{
if
(
StringUtils
.
length
(
sessionId
)
>
0
)
{
sessionStruct
=
findSessionBySessionId
(
sessionId
);
if
(
sessionStruct
==
null
)
{
sessionStruct
=
newSession
(
user
,
properties
);
...
...
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