Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-usercenter
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 46b3292b
authored
Oct 31, 2025
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
安全漏洞修复版本:登录接口统一登录失败提示语 See merge request
!2
2 parents
895a43d9
7f16ccda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
src/main/java/cn/com/glsx/shield/modules/service/UserService.java
src/main/java/cn/com/glsx/shield/modules/service/UserService.java
View file @
46b3292
...
@@ -666,18 +666,21 @@ public class UserService {
...
@@ -666,18 +666,21 @@ public class UserService {
public
void
verify
(
User
user
,
String
inputPassword
)
{
public
void
verify
(
User
user
,
String
inputPassword
)
{
//是否存在
//是否存在
if
(
user
==
null
)
{
if
(
user
==
null
)
{
throw
new
UserCenterException
(
"当前登录账号不存在"
);
log
.
info
(
"当前登录账号不存在"
);
throw
new
UserCenterException
(
"登录名或密码错误,请重试"
);
}
}
//是否停用
//是否停用
if
(!
SysConstants
.
EnableStatus
.
enable
.
getCode
().
equals
(
user
.
getEnableStatus
()))
{
if
(!
SysConstants
.
EnableStatus
.
enable
.
getCode
().
equals
(
user
.
getEnableStatus
()))
{
throw
new
UserCenterException
(
"当前账号已被停用"
);
log
.
info
(
"当前账号已被停用"
);
throw
new
UserCenterException
(
"登录名或密码错误,请重试"
);
}
}
//密码是否ok
//密码是否ok
boolean
pwdFlag
=
this
.
verifyPassword
(
user
,
inputPassword
);
boolean
pwdFlag
=
this
.
verifyPassword
(
user
,
inputPassword
);
if
(!
pwdFlag
)
{
if
(!
pwdFlag
)
{
throw
new
UserCenterException
(
"账号或密码不正确"
);
log
.
info
(
"账号或密码不正确"
);
throw
new
UserCenterException
(
"登录名或密码错误,请重试"
);
}
}
}
}
...
@@ -692,7 +695,8 @@ public class UserService {
...
@@ -692,7 +695,8 @@ public class UserService {
if
(
SpecialLoginEnum
.
SPECIAL_LOGIN
.
getCode
().
equals
(
specialLogin
))
{
if
(
SpecialLoginEnum
.
SPECIAL_LOGIN
.
getCode
().
equals
(
specialLogin
))
{
if
(
SpecialMarkEnum
.
MINI_SPECIAL_LOGIN_FLAG
.
getName
().
equals
(
specialMark
))
{
if
(
SpecialMarkEnum
.
MINI_SPECIAL_LOGIN_FLAG
.
getName
().
equals
(
specialMark
))
{
// 小程序默认登录加密串 小程序都不能允许登录
// 小程序默认登录加密串 小程序都不能允许登录
throw
new
UserCenterException
(
"此账户限制登录,请与管理员联系"
);
log
.
info
(
"此账户限制登录,请与管理员联系"
);
throw
new
UserCenterException
(
"登录名或密码错误,请重试"
);
}
}
// web如果数据库没有加密字符串 则是第一次登录 或者重置以后 校验通过
// web如果数据库没有加密字符串 则是第一次登录 或者重置以后 校验通过
...
@@ -702,7 +706,8 @@ public class UserService {
...
@@ -702,7 +706,8 @@ public class UserService {
// 如果是特殊登陆校验加密字符串
// 如果是特殊登陆校验加密字符串
if
(!
Objects
.
equals
(
user
.
getSpecialMark
(),
specialMark
))
{
if
(!
Objects
.
equals
(
user
.
getSpecialMark
(),
specialMark
))
{
throw
new
UserCenterException
(
"此账户限制登录,请与管理员联系"
);
log
.
info
(
"此账户限制登录,请与管理员联系"
);
throw
new
UserCenterException
(
"登录名或密码错误,请重试"
);
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment