mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 17:16:16 +00:00
HandleMargeUpdateDevice used to call AddDeviceToAccount (an upsert) and only check body-vs-URL deviceID after the row was already written. A speaker sending a malformed PUT with the wrong deviceid attribute would still leave a spurious record before getting 400. Now we parse just the deviceid attribute, compare against the URL segment, and only call into the upsert when they match. The existing regression test gains two GetDeviceInfo assertions to lock the no-spurious-row guarantee in. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>