Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
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
gechengyang
nouiWithSpringMVC
Commits
bdc44684
Commit
bdc44684
authored
Sep 26, 2020
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防登陆暴力破解
parent
88d37b6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
DatabaseLoginContextForELCS.java
...com/brilliance/eibs/auth/DatabaseLoginContextForELCS.java
+5
-5
No files found.
src/main/java/cn/com/brilliance/eibs/auth/DatabaseLoginContextForELCS.java
View file @
bdc44684
...
...
@@ -251,6 +251,11 @@ public class DatabaseLoginContextForELCS extends AbstractLoginContext {
ResultSet
rs
=
null
;
PreparedStatement
stmt
=
null
;
try
{
if
(
sendcode
==
null
||
verifycode
==
null
||
!
sendcode
.
equalsIgnoreCase
(
verifycode
))
{
log
.
info
(
"验证码验证失败,待校验:"
+
sendcode
+
",原始:"
+
verifycode
);
parameterMap
.
put
(
ERROR
,
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
);
return
setLogon
(
false
,
userName
,
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
.
getCode
(),
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
.
getMessage
(),
stmt
,
rs
);
}
String
sql
=
"SELECT inr,pwd,fltcnt,sta,etyextkey,usg,pwdamedat,ukey FROM usr WHERE nam=?"
;
stmt
=
conn
.
prepareStatement
(
sql
);
stmt
.
setString
(
1
,
userName
);
...
...
@@ -266,11 +271,6 @@ public class DatabaseLoginContextForELCS extends AbstractLoginContext {
sessionTimeout
=
-
1
;
return
setLogon
(
true
,
userName
,
null
,
"游客成功登录."
,
stmt
,
rs
);
}
if
(
sendcode
==
null
||
verifycode
==
null
||
!
sendcode
.
equalsIgnoreCase
(
verifycode
))
{
log
.
info
(
"验证码验证失败,待校验:"
+
sendcode
+
",原始:"
+
verifycode
);
parameterMap
.
put
(
ERROR
,
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
);
return
setLogon
(
false
,
userName
,
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
.
getCode
(),
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
.
getMessage
(),
stmt
,
rs
);
}
userId
=
rs
.
getString
(
1
);
log
.
debug
(
"userId="
+
userId
);
String
dbPassword
=
rs
.
getString
(
2
);
...
...
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