mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
Potential fix for pull request finding 'CodeQL / Log entries created from user input'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -566,7 +566,12 @@ func (ws *WebSocketClient) handleEvent(event *models.WebSocketEvent) {
|
||||
// Log the actual unmodeled element names (e.g. nowSelectionUpdated)
|
||||
// rather than an empty list; skip frames that carry no child events.
|
||||
if names := event.UnknownEventNames(); len(names) > 0 {
|
||||
ws.logger.Printf("Received unhandled event types: %v", names)
|
||||
sanitizedNames := make([]string, 0, len(names))
|
||||
for _, name := range names {
|
||||
sanitizedNames = append(sanitizedNames, sanitizeLog(name))
|
||||
}
|
||||
|
||||
ws.logger.Printf("Received unhandled event types: %v", sanitizedNames)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user