snarfed / bridgy-fed

🌉 A bridge between decentralized social network protocols
https://fed.brid.gy
Creative Commons Zero v1.0 Universal
666 stars 34 forks source link

AP: Invalid `object` in `Follow` in `Accept` #1492

Open Tamschi opened 2 hours ago

Tamschi commented 2 hours ago

I enabled trace logging in GoToSocial and retried a follow. Looks like it's upset with this:

{
    "@context": "https://www.w3.org/ns/activitystreams",
    "actor": "https://bsky.brid.gy/ap/did:plc:inze6wrmsm7pjl7yta3oig77",
    "id": "https://bsky.brid.gy/convert/ap/did:plc:inze6wrmsm7pjl7yta3oig77/followers#accept-https://gotosocial.i.eta.st/users/eta/follow/01JYZNV5JJ9GP3QQTDJJG4HP5X",
    "object": {
        "actor": "https://gotosocial.i.eta.st/users/eta",
        "id": "https://gotosocial.i.eta.st/users/eta/follow/01JYZNV5JJ9GP3QQTDJJG4HP5X",
        "object": "did:plc:inze6wrmsm7pjl7yta3oig77",
        "to": "https://bsky.brid.gy/ap/did:plc:inze6wrmsm7pjl7yta3oig77",
        "type": "Follow",
        "url": "https://gotosocial.i.eta.st/users/eta#followed-did:plc:inze6wrmsm7pjl7yta3oig77"
    },
    "to": "https://www.w3.org/ns/activitystreams#Public",
    "type": "Accept"
}

I would hazard a guess that it's looking at the object property, and not the to (this seems to point in that direction: https://github.com/superseriousbusiness/gotosocial/blob/main/internal/typeutils/astointernal.go#L465). Putting a bsky DID in there is certainly interesting -- I'm surprised that doesn't cause more problems!

(edit: looking at the spec and what mastodon does, I'm not sure that's indeed compliant)

Originally posted by @eeeeeta in https://github.com/snarfed/bridgy-fed/issues/1033#issuecomment-2480020155

Tamschi commented 2 hours ago

This should have the original Follow's object, I'll see if I can find it.

Tamschi commented 2 hours ago

Unfortunately not, looks like it's a bit too indirect to be a really quick fix.