mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
A video from a genuinely whitelisted author refused to play with "not from a whitelisted author" (the source URL was confirmed healthy — HTTP 200, video/mp4, range, CORS *). Root cause: accessControl keeps the whitelist in two sets — whitelistPubkeys (hex) and whitelist (npub) — and canAccess consulted only one based on the caller's input format without cross-deriving. playbackCoordinator passes the author's npub, so it checked only the npub set; an entry present in only the hex representation read as "not allowed." - canAccess now derives BOTH hex and npub from the candidate and checks both sets (only fixes false-negatives; a non-whitelisted author is still denied). - Dev-gated diagnostic at the playback rejection logs hex/npub, whitelistMode, set sizes, and inNpubSet/inHexSet to pinpoint any remaining denial. - Tests: tests/access-control-canaccess.test.mjs. Co-Authored-By: Claude Opus 4.8 <[email protected]>