refactor: Sanitize log inputs in FAQ, Knowledge, and KnowledgeBase handlers to enhance security

This commit is contained in:
wizardchen
2025-11-26 19:52:07 +08:00
parent 85caee044a
commit 06a1c96cf2
4 changed files with 31 additions and 14 deletions
+2 -1
View File
@@ -238,7 +238,8 @@ func (h *KnowledgeHandler) CreateManualKnowledge(c *gin.Context) {
return
}
logger.Infof(ctx, "Manual knowledge created successfully, knowledge ID: %s", secutils.SanitizeForLog(knowledge.ID))
logger.Infof(ctx, "Manual knowledge created successfully, knowledge ID: %s",
secutils.SanitizeForLog(knowledge.ID))
c.JSON(http.StatusOK, gin.H{
"success": true,
"data": knowledge,