Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
yaru
fgqyxxlr
Commits
690a9a62
Commit
690a9a62
authored
Jun 10, 2020
by
goodhal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改验证码在使用后仍可用的问题
parent
e91adcc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java
+3
-0
No files found.
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java
View file @
690a9a62
...
...
@@ -61,10 +61,13 @@ public class CaptchaValidateFilter extends AccessControlFilter
{
Object
obj
=
ShiroUtils
.
getSession
().
getAttribute
(
Constants
.
KAPTCHA_SESSION_KEY
);
String
code
=
String
.
valueOf
(
obj
!=
null
?
obj
:
""
);
//无论验证码是否正确,凡验证过一次后都应将原值不可用,直到页面重新请求验证码,以防恶意用户持有该验证码进行针对后台发包的暴力破解
request
.
getSession
().
setAttribute
(
Constants
.
KAPTCHA_SESSION_KEY
,
ShiroConstants
.
CAPTCHA_ERROR
);
if
(
StringUtils
.
isEmpty
(
validateCode
)
||
!
validateCode
.
equalsIgnoreCase
(
code
))
{
return
false
;
}
return
true
;
}
...
...
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