mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-01 03:24:14 +08:00
fix: Fix the security entry verification error issue. (#7854)
Refs #7853
This commit is contained in:
parent
8bb225d272
commit
036c973fec
@ -56,8 +56,8 @@ func (b *BaseApi) UpdateSetting(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if req.Key == "SecurityEntrance" {
|
if req.Key == "SecurityEntrance" {
|
||||||
if checkEntrancePattern(req.Value) {
|
if !checkEntrancePattern(req.Value) {
|
||||||
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, fmt.Errorf("regexp match string with %s failed", req.Value))
|
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, fmt.Errorf("the format of the security entrance %s is incorrect.", req.Value))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user