Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: check empty values on update feishu setting (#3440)

p0nyda2cbc522a76
diff --git a/server/setting.go b/server/setting.go
index 6303d21a2d..e7a707a3aa 100644
--- a/server/setting.go
+++ b/server/setting.go
@@ -72,6 +72,9 @@ func (s *Server) registerSettingRoutes(g *echo.Group) {
return echo.NewHTTPError(http.StatusBadRequest, api.FeatureIMApproval.AccessErrorMessage())
}
if value.ExternalApproval.Enabled {
+ if value.AppID == "" || value.AppSecret == "" {
+ return echo.NewHTTPError(http.StatusBadRequest, "Application ID and secret cannot be empty")
+ }
p := s.ApplicationRunner.p
// clear token cache so that we won't use the previous token.
p.ClearTokenCache()