refactor: Sanitize log inputs in chunk and session handlers to enhance security

This commit is contained in:
wizardchen
2025-11-26 16:36:09 +08:00
parent 0132ece3fe
commit b4ae609103
2 changed files with 2 additions and 9 deletions
+2 -1
View File
@@ -122,7 +122,8 @@ func (h *Handler) KnowledgeQA(c *gin.Context) {
}
// Use shared function to handle KnowledgeQA request
h.handleKnowledgeQARequest(ctx, c, session, request.Query, knowledgeBaseIDs, assistantMessage, true, request.SummaryModelID, request.WebSearchEnabled)
h.handleKnowledgeQARequest(ctx, c, session, secutils.SanitizeForLog(request.Query),
knowledgeBaseIDs, assistantMessage, true, secutils.SanitizeForLog(request.SummaryModelID), request.WebSearchEnabled)
}
// AgentQA handles agent-based question answering with conversation history and streaming