Our Personal Data Server from scratch! tranquil.farm
oauth atproto pds rust postgresql objectstorage fun

fix(proxy): protect more com.atproto.repo methods #20

Anisota seems to be using these in a way which attempts to proxy them - unfortunately they aren't actually meant to be proxied and fail... the list records method outright returns XRPCNotSupported and the get record method gives RecordNotFound

...we just, like, shouldn't be proxying it. Avoiding proxying completely fixes this issue...

Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:uuyqs6y3pwtbteet4swt5i5y/sh.tangled.repo.pull/3mehqoaxr3222
+2
Diff #0
+2
crates/tranquil-pds/src/api/proxy.rs
··· 40 40 "com.atproto.repo.applyWrites", 41 41 "com.atproto.repo.createRecord", 42 42 "com.atproto.repo.deleteRecord", 43 + "com.atproto.repo.getRecord", 43 44 "com.atproto.repo.importRepo", 45 + "com.atproto.repo.listRecords", 44 46 "com.atproto.repo.putRecord", 45 47 "com.atproto.repo.uploadBlob", 46 48 "com.atproto.server.activateAccount",

History

1 round 2 comments
sign up or login to add to the discussion
a.starrysky.fyi submitted #0
1 commit
expand
fix(proxy): protect more com.atproto.repo methods
merge conflicts detected
expand
  • crates/tranquil-pds/src/api/proxy.rs:40
expand 2 comments

the main issue here is that social-app and its forks make getRecord calls that they do expect to be proxied (or at least the not-quite-proxying-but-has-the-same-effect fallback implementation of the reference pds). so blocking proxying of this would break replies for the vast majority of bluesky users on tranquil.

from a purely design pov too this kind of goes against some of the core values of tranquil. we want to implement spec not whatever weird things buggy clients expect. if anisota truly doesnt want those requests proxied then it shouldnt set the proxy header for them. doing so is a bug.

we reluctantly accept that the vast majority of atproto users use bluesky so we have to implement a fair bit of special-case out of spec things for it to work but the goal is eventually to remove that too once atproto itself and the reference implementation catches up to the needs of bluesky.

ack, thanks - didn't realize this would break bluesky - I'll see if I can chat about this with anisota team instead and figure out if there's some reverse proxy hack I can do to stopgap for myself then... I guess there's not much that can be done here (I'm at the airport now, but I'll close this and rebase #21 when I have a few moments)