refactor: Sanitize log inputs in mcp_service, duckduckgo, auth, faq, message, and model handlers to enhance security

This commit is contained in:
wizardchen
2025-11-26 00:57:33 +08:00
parent 9fc6c949e5
commit 8e3c2d8547
6 changed files with 19 additions and 14 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ func (h *ModelHandler) CreateModel(c *gin.Context) {
c.Error(errors.NewBadRequestError(err.Error()))
return
}
req.Name = secutils.SanitizeForLog(req.Name)
tenantID := c.GetUint64(types.TenantIDContextKey.String())
if tenantID == 0 {
logger.Error(ctx, "Tenant ID is empty")