refactor: Sanitize log inputs in user, auth, knowledge, and model handlers to enhance security

This commit is contained in:
wizardchen
2025-11-26 10:50:53 +08:00
parent 8e3c2d8547
commit 09642445de
5 changed files with 20 additions and 11 deletions
+5 -1
View File
@@ -145,7 +145,11 @@ func (h *MCPServiceHandler) UpdateMCPService(c *gin.Context) {
updateFields["description"] = true
}
if enabled, ok := updateData["enabled"].(bool); ok {
service.Enabled = enabled
if enabled {
service.Enabled = true
} else {
service.Enabled = false
}
updateFields["enabled"] = true
}
if transportType, ok := updateData["transport_type"].(string); ok {