mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-04 12:34:25 +08:00
fix: Fix the security entry verification error issue. (#7854)
Some checks failed
SonarCloud Scan / SonarCloud (push) Failing after 9s
Some checks failed
SonarCloud Scan / SonarCloud (push) Failing after 9s
Refs #7853
This commit is contained in:
parent
8bb225d272
commit
036c973fec
1 changed files with 2 additions and 2 deletions
|
@ -56,8 +56,8 @@ func (b *BaseApi) UpdateSetting(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
if req.Key == "SecurityEntrance" {
|
||||
if checkEntrancePattern(req.Value) {
|
||||
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, fmt.Errorf("regexp match string with %s failed", req.Value))
|
||||
if !checkEntrancePattern(req.Value) {
|
||||
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, fmt.Errorf("the format of the security entrance %s is incorrect.", req.Value))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue