Remove file path information from track data in WebSocket responses (low/no-risk)

This commit is contained in:
2025-09-26 12:30:23 -04:00
parent 8f59326c82
commit e08e25a3b8

View File

@@ -538,6 +538,7 @@ class Radio(FastAPI):
try:
# Send current track info immediately on connect
current_track = await self._get_now_playing_data(station)
current_track.pop("file_path", None) # Ensure file_path is stripped
await websocket.send_text(json.dumps(current_track))
# Send LRC asynchronously
@@ -598,6 +599,9 @@ class Radio(FastAPI):
if station not in self.active_connections:
return
# Remove sensitive file path info
track_data.pop("file_path", None)
# Create broadcast message
broadcast_data = {
"type": "track_change",