An AT Protocol Personal Data Server written in JavaScript pdsjs.dev

createSpace accepts readPolicy/writePolicy and silently stores the default policy #6

Open trezy.codes
Open opened by trezy.codes

The current com.atproto.simplespace lexicons split policy into readPolicy and writePolicy. pds.js doesn't read either field, and doesn't reject them. A space created as public comes back as member-list.

Steps #

  1. createSpace with "readPolicy": {"$type": "com.atproto.simplespace.defs#publicPolicy"} and "writePolicy": {"$type": "com.atproto.simplespace.defs#publicPolicy"}.
  2. getSpace: the response has "policy": {"$type": "com.atproto.simplespace.defs#memberListPolicy"}.

Expected #

The split policies are stored, or the request is rejected with an error. Silently applying a different access policy than the caller asked for is the problem.

Cause #

configSource in packages/spaces/src/handlers/manage.js only recognises policy/appAccess at the top level. Otherwise it falls back to config, so readPolicy/writePolicy are never read and readPolicy() defaults to member-list.

Sign up or Sign in to add to the discussion.