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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user