fix(security): redact IM list credentials and harden MinerU SSRF

Stop returning bot credentials from Viewer-accessible IM channel list
endpoints and validate self-hosted MinerU URLs at config save and fetch time.
This commit is contained in:
wizardchen
2026-07-02 17:50:04 +08:00
committed by lyingbug
parent 929697618f
commit 7099a7e181
7 changed files with 190 additions and 5 deletions
+2 -3
View File
@@ -131,13 +131,12 @@ func (h *IMHandler) ListIMChannels(c *gin.Context) {
return
}
c.JSON(http.StatusOK, gin.H{"data": channels})
c.JSON(http.StatusOK, gin.H{"data": im.SummarizeIMChannels(channels)})
}
// ListAllIMChannels lists every IM channel in the current tenant, across
// agents, for the cross-agent overview page. Credentials are intentionally
// NOT included in the response — callers that need credentials must use the
// per-agent endpoint (GET /agents/:id/im-channels).
// NOT included in the response.
func (h *IMHandler) ListAllIMChannels(c *gin.Context) {
tenantID, ok := c.Request.Context().Value(types.TenantIDContextKey).(uint64)
if !ok {