mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
Fixes CodeQL go/log-injection alerts in the handlers package. Adds pkg/service/handlers/logutil.go with a package-private sanitizeLog helper that strips \n and \r from strings before they reach log call sites. Values from speakers, HTTP requests, and external APIs (device IDs, account IDs, IP addresses, speaker names, OAuth user IDs/emails, station IDs, URL paths, user-agent strings) may contain attacker-controlled newlines. Wraps all external-data string arguments across 12 files: handlers_account_mgmt.go, handlers_alexa.go, handlers_bmx_orion.go, handlers_bmx_siriusxm.go, handlers_bmx_tunein.go, handlers_catchall.go, handlers_export.go, handlers_marge.go, handlers_mgmt.go, handlers_oauth.go, origin_middleware.go, server.go. No behaviour change — purely a logging concern. make check passes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>