Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web => AP: wrong actor and author ids in outgoing AS2 activities #700

Closed
snarfed opened this issue Oct 27, 2023 · 10 comments
Closed

Web => AP: wrong actor and author ids in outgoing AS2 activities #700

snarfed opened this issue Oct 27, 2023 · 10 comments

Comments

@snarfed
Copy link
Owner

snarfed commented Oct 27, 2023

Looks like this regressed recently, not sure why yet. Thanks for reporting @StarrWulfe! Eg https://starrwulfe.xyz/2023/10/27/00/05/32030/ turned into this AS2:

{
  "id": "https://fed.brid.gy/r/https://starrwulfe.xyz/2023/10/27/00/05/32030/#bridgy-fed-create",
  "actor": "https://starrwulfe.xyz/2023/10/13/11/39/403/",
  "published": "2023-10-27T04:05:26.515058+00:00",
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Create",
  "object": {
    "published": "2023-10-27T00:05:19-04:00",
    "updated": "2023-10-27T00:05:19-04:00",
    "content": "<p>Here\u2019s a test reply.</p>\n<p>This better work or else I gotta beg @snarfed.org@snarfed.org for help.</p>",
    "url": "https://fed.brid.gy/r/https://starrwulfe.xyz/2023/10/27/00/05/32030/",
    "id": "https://fed.brid.gy/r/https://starrwulfe.xyz/2023/10/27/00/05/32030/",
    "type": "Note",
    "attributedTo": "https://starrwulfe.xyz/author/starrwulfe/",
    "inReplyTo": "https://friendica.opensocial.space/objects/8ffdf77c-5065-3b27-9512-cd7842048008",
    "cc": [
      "https://friendica.opensocial.space/profile/starrwulfe",
      "https://www.w3.org/ns/activitystreams#Public",
      "https://friendica.opensocial.space/followers/starrwulfe"
    ],
    "contentMap": {
      "en": "<p>Here\u2019s a test reply.</p>\n<p>This better work or else I gotta beg @snarfed.org@snarfed.org for help.</p>"
    },
    "tag": [{
        "type": "Mention",
        "href": "https://friendica.opensocial.space/profile/starrwulfe"
      }],
    "to": ["https://www.w3.org/ns/activitystreams#Public"]
  },
  "to": ["https://www.w3.org/ns/activitystreams#Public"]
}

I originally thought b7e890b was the culprit, but I rolled that back and tried again and got the same result above.

Interestingly other recent posts on https://fed.brid.gy/web/starrwulfe.xyz seem to be converted and delivered fine, eg https://starrwulfe.xyz/2023/10/26/21/55/n-rodgers-chic-npr-tiny-desk/ turned into the activity below, with the correct actor and object.attributedTo
(log):

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Create",
  "id": "https://fed.brid.gy/r/https://starrwulfe.xyz/2023/10/26/21/55/n-rodgers-chic-npr-tiny-desk/#bridgy-fed-create",
  "actor": "https://fed.brid.gy/starrwulfe.xyz",
  "published": "2023-10-27T01:57:16.297266+00:00",
  "object": {
    "type": "Note",
    "id": "https://fed.brid.gy/r/https://starrwulfe.xyz/2023/10/26/21/55/n-rodgers-chic-npr-tiny-desk/",
    "published": "2023-10-26T21:55:36-04:00",
    "updated": "2023-10-26T21:57:01-04:00",
    "content": "...",
    "url": "https://fed.brid.gy/r/https://starrwulfe.xyz/2023/10/26/21/55/n-rodgers-chic-npr-tiny-desk/",
    "attributedTo": "https://fed.brid.gy/starrwulfe.xyz",
    "tag": [{
        "type": "Hashtag",
        "name": "#micro",
        "href": "https://fed.brid.gy/hashtag/micro"
      },
      {
        "type": "Hashtag",
        "name": "#seen",
        "href": "https://fed.brid.gy/hashtag/seen"
      }],
    "contentMap": { "en": "..." },
    "to": ["https://www.w3.org/ns/activitystreams#Public"]
  },
  "to": ["https://www.w3.org/ns/activitystreams#Public"]
}
@snarfed
Copy link
Owner Author

snarfed commented Oct 27, 2023

The plot thickens: I tried a reply just now and it worked fine, https://snarfed.org/2023-10-27_reply-heres-a-test-reply-this-better-wor-%ef%bd%93%ef%bd%94%ef%bd%81%ef%bd%92%ef%bd%92%ef%bd%97%ef%bd%95%ef%bd%8c%ef%bd%86%ef%bd%85-federated => https://friendica.opensocial.space/display/8ffdf77c-1365-3b39-1f26-cec333244032

@StarrWulfe btw, it looks like you're using both the WordPress ActivityPub plugin and Bridgy Fed with your site. For example, your original test reply on https://friendica.opensocial.space/display/8ffdf77c-1365-3b39-1f26-cec333244032 is from the plugin. You're probably going to have a bad time if you mix both of those together on the same site. Eg your site currently redirects its webfinger to Bridgy Fed, which means the plugin probably won't work very well in some ways.

@pfefferle I guess we should probably figure out some general recommendations. Maybe just "don't do that" ? 😁

@StarrWulfe
Copy link

StarrWulfe commented Oct 27, 2023

Thanks for looking into this for me @snarfed! 🙇

(webmention as a summoning device... who knew? 😉)

📡🔀: 🌟🐺 https://starrwulfe.xyz/t/8tq

@pfefferle
Copy link

@snarfed you mean in case someone tries both? Is there an easy way that I can detect that someone is using fed.brid.gy?

@StarrWulfe
Copy link

@snarfed @pfefferle I had it running pretty decently with both for a good week or so before these issues started happening.
Basically I had it set up where @starrwufe was going through the AP plugin on the site and @starruwlfe.net was going through BridgyFed. This would be my preferred setup of possible since there's no easy way of doing "wildcard" accounts in ActivityPub the way you can with either regular URLs or even email.

Perhaps this was an anomaly of sorts where now enough DNS caching in the network has happened to start creating some kind of "feedback loop" effect that now cancels things out?

Is there a way where I could "have my cake (@StarrWulfe being served by the AP plugin on the site) and eat it too? (@starrwulfe.xyz being served by Bridgyfed)" or is there another method to do this?

@snarfed
Copy link
Owner Author

snarfed commented Oct 28, 2023

@pfefferle the clearest way is probably to check if WebFinger (.well-known/webfinger) is redirecting to fed.brid.gy or not.

@snarfed
Copy link
Owner Author

snarfed commented Oct 28, 2023

@StarrWulfe one critical part right now is WebFinger, whatever serves that does it for the entire domain, and we don't yet have a way to "share" it between multiple providers. We could build that!...but I doubt it would be high priority.

@StarrWulfe
Copy link

@snarfed -- I see. For some reason I was thinking webfinger could refer to both at once and let the software do the sorting. In this case, is there way to change the BridgyFed site? I'm thinking of creating a micro.starrwulfe.com that will strictly be for the back and forth replies that happen.

I currently have a Tumblr blog that has webmentions being piped to Bridgy -- will that work?
Unless @pfefferle can help me with how to do some of the commenting stuff in his plugin and make it work easily...🙇🏾‍♂️

@snarfed
Copy link
Owner Author

snarfed commented Oct 30, 2023

Bridgy Fed will definitely work on micro.starrwulfe.com! It will be a different identity though, @micro.starrwulfe.com.

The key point is that WebFinger requests for all fediverse identities on a given host, eg @*@starrwulfe.xyz, have to be handled by the same single server, ie piece of software.

(Tumblr + Bridgy classic is unrelated, it'll still work fine!)

@snarfed
Copy link
Owner Author

snarfed commented Nov 8, 2023

Chalking this up to Bridgy Fed / plugin interaction, tentatively closing. @StarrWulfe feel free to reopen if anything else still seems wrong on our end!

@snarfed snarfed closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
@StarrWulfe
Copy link

Nope-- rectified it on my end with a workflow adjustment ✌️

@pfefferle make sure to note this in the Wordpress ActivityPub plug-in instructions so others don't make this mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants