chadtmiller.com/group-host
atmosphere group host
0
0
Percent-encoded scope values are not decoded, so the scope is withheld
Closedchadtmiller.com mentioned this in Scopes are read in every form atproto writes them
What happened
scope query values are compared as raw text. Take an app that asks for
space:com.example.cal?authority=did%3Aplc%3Aabc&action=read, which is whatURLSearchParamsproduces and what the reference scope parser decodes. Herefor_groupcomparesdid%3Aplc%3Aabcwithdid:plc:abc, sonarrowwithholds the scope (spaceisNone, and the request falls through tofalse). The same holds for an encodedskeyorcollection, andPermissions::spacewould not match such a value when the token is used. The host encodes this way itself:move_scope(account_move.rs:172) escapes every:in itsaud. No test covers an encoded scope value.How to see it
Read against
docs/freshat 4636e6d, the code at: crates/group-host/src/oauth_scope.rs:45 (SpaceScope::parse), :75 (for_group); crates/group-host/src/scopes.rs:18 (query). Paths are undercrates/group-host/srcunless they say otherwise. Severity: medium.What you expected
Percent-decode each key and value when a scope's query is split, in both
SpaceScope::parseandscopes::query. A shared helper would keep the two readings the same.Where
The host, as built from 4636e6d. Found while checking the docs against the code.