From 036c973fec8d4f4a294cb2382a121851d2f0f946 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 11 Feb 2025 18:13:49 +0800 Subject: [PATCH] fix: Fix the security entry verification error issue. (#7854) Refs #7853 --- backend/app/api/v1/setting.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/api/v1/setting.go b/backend/app/api/v1/setting.go index 54959749a..bce6b7113 100644 --- a/backend/app/api/v1/setting.go +++ b/backend/app/api/v1/setting.go @@ -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 } }