~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A former member's files are still fetched for `getSpaceBlob`

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

put_out unindexes the member from each space but leaves their space_writer row. space_blob checks only that repo is in the writer set, not that the space still lets them write. The index makes that check (index.rs:156); space_blob does not. So after Bob is ejected, Alice, still a member, calls getSpaceBlob?repo=<bob>&cid=<his picture>. The host signs a credential as the group, fetches the file from Bob's PDS (or from the store, if Bob's repo is here) and serves it, though the group has "forgotten what he wrote". The same holds for a writer dropped by a writableBy change. No test covers a blob after ejectMember.

How to see it

Read against docs/fresh at 4636e6d, the code at: index_api.rs:195-199 (space_blob), group_members.rs:448-452 (put_out). Paths are under crates/group-host/src unless they say otherwise. Severity: medium.

What you expected

In space_blob, also require self.may(space, &hosted, Some(repo), Access::Write), as sync_space does. Alternatively, have put_out drop the member's writer row.

Where

The host, as built from 4636e6d. Found while checking the docs against the code.