From 028c4bf71d69f01ada259b7ce5be21ccf1a40eaf Mon Sep 17 00:00:00 2001 From: SakoroYou <165740095+Sakurapainting@users.noreply.github.com> Date: Fri, 27 Mar 2026 19:02:09 +0800 Subject: [PATCH] fix: avoid leak details contained in the error string This fmt.Printf adds an extra stdout error line on send failures. Besides duplicating the logger entry above, it can leak details contained in the error string (potentially including QQ identifiers) and makes it harder to control output in embedded deployments. Consider removing this print and relying on logger.ErrorCF (or gating any user-facing output behind a CLI-specific layer). Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pkg/channels/qq/qq.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/channels/qq/qq.go b/pkg/channels/qq/qq.go index 905fcaf55..004b8c420 100644 --- a/pkg/channels/qq/qq.go +++ b/pkg/channels/qq/qq.go @@ -357,6 +357,7 @@ func (c *QQChannel) Send(ctx context.Context, msg bus.OutboundMessage) ([]string "error": err.Error(), }) return nil, fmt.Errorf("qq send: %w", channels.ErrTemporary) +) } if sentMsg == nil {