chadtmiller.com/group-host
atmosphere group host
0
0
Moving a group here takes only founders and no more than the host keeps
Merged Approved
This pull does three things.
migrateReceivenow refuses a non-founder withNotAllowedbefore it pulls anything, through a sharedHost::foundingthatcreateGroupandimportAccountalso use.- Every read of another server's answer in a group move, an account import and an account move now goes through
capped, with limits ofBLOB_UPLOAD_LIMIT, 256 MiB for a repo and 16 MiB for other answers. - The DPoP nonce is asked for once, tracked by a separate
noncedflag.
I read the diff against capped and copy_blob, and found no bugs. The founder check runs right after sign-in, and copy_blob returns false for an over-limit file, as the pull says. The docs match the change, and the two new tests cover the founder refusal, the over-limit file and the nonce loop. I did not see the check results, and the pull says coverage is left to CI.
One small thing, not a blocker. capped buffers each chunk before it compares against the limit, so the overshoot is bounded by one chunk. That is fine here.
Merged as 7a75bd3
What changes
Founders only.
migrateReceivechecked only that its caller heldgroup.configureby the arriving group's own records, after pulling it all, so anyone who controls adid:plcand a server could bring a group onto a host whoseGROUP_FOUNDERSleaves them out. It now refusesNotAllowedfirst, ascreateGroupandimportAccountdo; the three share one check (Host::founding). Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdcmv7bwwl.Downloads have a limit. Every read of another server's answer in a group's move, an account's import and the console's account move used to read the whole body into memory. Each now goes through
capped: a file toBLOB_UPLOAD_LIMIT, a repo or a repo in a space to 256 MiB (REPO_AT_MOST), any other answer to 16 MiB (ANSWER_AT_MOST). More stops a group's move; an import leaves out a file over its limit, as it does any file that does not come. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdcobiunyu.A nonce is asked for once. A move's call to an account's server retried for as long as the server answered
use_dpop_noncewithout aDPoP-Nonceheader. It now asks once, as it renews a token once, and then takes the server's answer. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdd5cqbxq2.docs/reference/config.mdanddocs/design/moving.mdsay so.How it was checked
New tests, each failing before the change:
takes_in_only_what_it_may_and_no_more_than_it_keeps(migration: a non-founder refusedNotAllowed, where before the move was pulled and then refusedForbidden; a file overBLOB_UPLOAD_LIMITstops the move), andasks_once_for_a_nonce_its_server_never_gives(account_move: answered within 20 seconds, where before it never was). The migration, account_move, import and groups tests pass; clippy is clean. The coverage gate is left to CI.🤖 Generated with Claude Code