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

Narrowing withholds `repo?collection=…` and `blob?accept=…` scopes

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

narrow keeps a repo scope only when it starts with repo:, and a blob scope only when it starts with blob:. Both repo?collection=app.bsky.feed.post&collection=app.bsky.feed.like and blob?accept=image/* are valid permission-spec forms, and scopes.rs (named with an empty resource) honours them at use. An app that asks in that form gets them withheld, even from a member whose roles hold repo:*.

How to see it

Read against docs/fresh at 4636e6d, the code at: crates/group-host/src/oauth_scope.rs:220 and :245. Paths are under crates/group-host/src unless they say otherwise. Severity: medium.

What you expected

Read the repo and blob scopes in narrow the way scopes.rs does. Take the collections from either repo:C or ?collection=, keep the scope when every one is allowed, and treat blob? the same as blob:.

Where

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