v2.4.1 — Audit Fixes
Fixes from a full codebase audit — one data-integrity bug, one review-quality fix, and security hardening.
🐛 Fixed: reassigning a visit left its history behind
Renaming a detection's species updated the detections table and moved the files — but your review history and any crown purge-protection entries kept pointing at the old file name. A reassigned visit could reappear in the Review queue as never-reviewed, its clips vanished from comparison strips, and worst of all, a crowned (protected) clip could silently lose its protection from the disk cleaner. Reassignments now carry both along automatically.
Note: reassignments made before this version left orphaned records behind (harmless clutter, but if you crowned a clip and then reassigned it, re-crown it from the bird's page to restore protection).
🔍 Fixed: the comparison strip could verify a visit against itself
Every detection in a visit shares one acoustic event — the same individual bird, the same background, the same distant mimic — so its errors are correlated. A mockingbird doing a ten-minute Nighthawk impression should never be "verified" against its own visit-mates. The Review page's comparison clips now come strictly from other visits, giving you independent evidence, with the candidate search built so that even a marathon 100-detection visit can't leave the strip empty.
🔒 Security: cross-site request protection for file actions
The delete / rename / shift / protect actions responded to plain GET requests, meaning a malicious webpage could theoretically trigger them (e.g., delete recordings) while you were signed in to your station in the same browser. They now require the same request header the newer API already demands — something a cross-site page cannot send. If a delete or rename button ever shows "missing X-Requested-With header", please open an issue; it means a call site was missed.
🧪 Developer tooling
The smoke test suite can now reseed its demo database on demand (RESEED=1), ending a long-standing source of false test failures. No effect on stations.
Updating
cd ~/BirdNET-Pi
git fetch origin
git pull --ff-only origin main
sudo bash scripts/update_birdnet_snippets.sh
Then refresh your browser.
🤖 Generated with Claude Code