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
1f69863f
Commit
1f69863f
authored
Sep 11, 2020
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复验证码缺陷和增加日志打印
parent
9cd8f443
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
DatabaseLoginContextForELCS.java
...com/brilliance/eibs/auth/DatabaseLoginContextForELCS.java
+1
-0
LoginController.java
...org/sss/presentation/noui/controller/LoginController.java
+1
-4
NoUiUtils.java
src/main/java/org/sss/presentation/noui/util/NoUiUtils.java
+1
-0
No files found.
src/main/java/cn/com/brilliance/eibs/auth/DatabaseLoginContextForELCS.java
View file @
1f69863f
...
@@ -199,6 +199,7 @@ public class DatabaseLoginContextForELCS extends AbstractLoginContext {
...
@@ -199,6 +199,7 @@ public class DatabaseLoginContextForELCS extends AbstractLoginContext {
return
setLogon
(
true
,
userName
,
null
,
"游客成功登录."
,
stmt
,
rs
);
return
setLogon
(
true
,
userName
,
null
,
"游客成功登录."
,
stmt
,
rs
);
}
}
if
(
sendcode
==
null
||
verifycode
==
null
||
!
sendcode
.
equalsIgnoreCase
(
verifycode
)){
if
(
sendcode
==
null
||
verifycode
==
null
||
!
sendcode
.
equalsIgnoreCase
(
verifycode
)){
log
.
info
(
"验证码验证失败,待校验:"
+
sendcode
+
",原始:"
+
verifycode
);
parameterMap
.
put
(
ERROR
,
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
);
parameterMap
.
put
(
ERROR
,
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
);
return
setLogon
(
false
,
userName
,
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
.
getCode
(),
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
.
getMessage
(),
stmt
,
rs
);
return
setLogon
(
false
,
userName
,
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
.
getCode
(),
ErrorCode
.
LOGIN_VERIFYCODE_ERROR
.
getMessage
(),
stmt
,
rs
);
}
}
...
...
src/main/java/org/sss/presentation/noui/controller/LoginController.java
View file @
1f69863f
...
@@ -50,7 +50,7 @@ public class LoginController {
...
@@ -50,7 +50,7 @@ public class LoginController {
String
password
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
PASSWORD
).
toString
();
String
password
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
PASSWORD
).
toString
();
String
dncode
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
DNCODE
)==
null
?
null
:
noUiRequest
.
getDataMap
().
get
(
Constants
.
DNCODE
).
toString
();
String
dncode
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
DNCODE
)==
null
?
null
:
noUiRequest
.
getDataMap
().
get
(
Constants
.
DNCODE
).
toString
();
String
sendcode
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
SENDCODE
)==
null
?
null
:
noUiRequest
.
getDataMap
().
get
(
Constants
.
SENDCODE
).
toString
();
String
sendcode
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
SENDCODE
)==
null
?
null
:
noUiRequest
.
getDataMap
().
get
(
Constants
.
SENDCODE
).
toString
();
String
verifycode
=
session
.
getAttribute
(
Constants
.
VERIFYCODE
)==
null
?
null
:
session
.
getAttribute
(
Constants
.
VERIFYCODE
).
toString
();
String
verifycode
=
request
.
getSession
().
getAttribute
(
Constants
.
VERIFYCODE
)==
null
?
null
:
request
.
getSession
()
.
getAttribute
(
Constants
.
VERIFYCODE
).
toString
();
map
.
put
(
"j_username"
,
userId
);
map
.
put
(
"j_username"
,
userId
);
map
.
put
(
"j_password"
,
password
);
map
.
put
(
"j_password"
,
password
);
map
.
put
(
"j_dncode"
,
dncode
);
map
.
put
(
"j_dncode"
,
dncode
);
...
@@ -93,13 +93,10 @@ public class LoginController {
...
@@ -93,13 +93,10 @@ public class LoginController {
return
ResultUtil
.
result
(
ErrorCodes
.
SUCCESS
,
ErrorCodes
.
SUCCESS_INFO
,
retDatamap
,
noUiVersion
.
getVersion
());
return
ResultUtil
.
result
(
ErrorCodes
.
SUCCESS
,
ErrorCodes
.
SUCCESS_INFO
,
retDatamap
,
noUiVersion
.
getVersion
());
}
else
{
}
else
{
ErrorCode
errorCode
=
(
ErrorCode
)
o
;
ErrorCode
errorCode
=
(
ErrorCode
)
o
;
log
.
error
(
errorCode
);
return
ResultUtil
.
result
(
errorCode
.
getCode
(),
errorCode
.
getMessage
(),
retDatamap
,
noUiVersion
.
getVersion
());
return
ResultUtil
.
result
(
errorCode
.
getCode
(),
errorCode
.
getMessage
(),
retDatamap
,
noUiVersion
.
getVersion
());
}
}
}
else
{
}
else
{
final
ErrorCode
errorCode
=
(
ErrorCode
)
map
.
get
(
ERROR
);
final
ErrorCode
errorCode
=
(
ErrorCode
)
map
.
get
(
ERROR
);
log
.
error
(
errorCode
);
session
.
removeAttribute
(
Constants
.
VERIFYCODE
);
return
ResultUtil
.
result
(
errorCode
.
getCode
(),
errorCode
.
getMessage
(),
null
,
noUiVersion
.
getVersion
());
return
ResultUtil
.
result
(
errorCode
.
getCode
(),
errorCode
.
getMessage
(),
null
,
noUiVersion
.
getVersion
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/org/sss/presentation/noui/util/NoUiUtils.java
View file @
1f69863f
...
@@ -38,6 +38,7 @@ public class NoUiUtils {
...
@@ -38,6 +38,7 @@ public class NoUiUtils {
public
static
IFilter
passwordFilter
;
public
static
IFilter
passwordFilter
;
public
static
boolean
connectKeeped
;
public
static
boolean
connectKeeped
;
public
static
String
serviceDbName
;
public
static
String
serviceDbName
;
public
static
int
STP
=
50
;
private
static
final
ThreadGroup
threadGroup
=
new
ThreadGroup
(
"eIBS"
);
private
static
final
ThreadGroup
threadGroup
=
new
ThreadGroup
(
"eIBS"
);
...
...
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