mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-11-09 00:22:38 -06:00
Both helpers compared a.GetID() against users.id, but *LinkSharing also satisfies web.Auth and its GetID() is a link_shares.id - a different id namespace. Passing one would have emitted users.id = <share id> and lent that share another user's identity, which is the confusion behind GHSA-vvcv-vpph-h844. Guarded at every call site, but the helpers moved out of models and into user, so the guard drifted away from the code needing it. Taking *User makes the case unrepresentable. Also fail closed on a zero id: humans store bot_owner_id = 0, so an unguarded zero would have matched all of them. The doc claimed JWT and CalDAV auth carry no BotOwnerID, but bots can reach neither path, and claimed bots-cannot-own-bots as an invariant when the guard is inert for JWT principals. Reworded to chain-safety by construction, which holds regardless.