Harden pairing and validate Remote song input #26
Loading…
Reference in a new issue
No description provided.
Delete branch "security/harden-pairing-and-song-input"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes three low-severity issues found in a source security review.
SecureRandom; persisted 4-digit codes are replaced on start. Remote input, hint text, mock server and docs updated./api/pairattempts are counted per client address (5/min) with a global ceiling (60/min), so one LAN device can no longer block pairing for everyone.videoIdmust be an 11-character YouTube id, thumbnails are limited to YouTube image hosts, title/channel lengths are bounded, and the queue is capped at 200.Testing
./gradlew testDebugUnitTestpasses;pnpm typecheckpasses. Added a test for song sanitizing; the per-host pairing limit has no test yet. Not run on a TV or emulator.Vi: Mã phòng giờ gồm 6 số khó đoán hơn, giới hạn thử sai theo từng thiết bị và chặn dữ liệu bài hát không hợp lệ từ điện thoại