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

Provide a federation link #6389

Open
snan opened this issue May 9, 2024 · 4 comments
Open

Provide a federation link #6389

snan opened this issue May 9, 2024 · 4 comments

Comments

@snan
Copy link

snan commented May 9, 2024

Describe the problem to be solved

I thought this video https://vod.newellijay.tv/w/b3fc74e3-f109-41dc-a1ea-54497521f215 was good and I wanted to share it. To find the federation URL, which is https://vod.newellijay.tv/videos/watch/b3fc74e3-f109-41dc-a1ea-54497521f215 , I had to grep the JSON by making API calls from the shell.

Describe the solution you would like

It'd be great if both:

  • The short URL itself (/w/ instead of /videos/watch/) also worked for federation, and
  • There was a fedi link button somewhere on the page for that short URL.
@Chocobozzz
Copy link
Owner

Hi,

Short URLs endpoints also provide the AP representation of the object. What was the other fediverse software you used to share the video URL?

There was a fedi link button somewhere on the page for that short URL.

I'm not sure to understand, can you describe the use case of such button?

@Chocobozzz Chocobozzz added the Status: Waiting for answer Waiting issue author answer label May 13, 2024
@snan
Copy link
Author

snan commented May 13, 2024

Short URLs endpoints also provide the AP representation of the object. What was the other fediverse software you used to share the video URL?

Akkoma. Works great with the long url, I can reply and reblog. Neither of those things work with just the /w/ version of the URL.

There was a fedi link button somewhere on the page for that short URL.

I'm not sure to understand, can you describe the use case of such button?

To get the long /videos/watch/ version of the URL, and to get the original instance's version of the URL because additionally, let's say I'm on peer tube and I wanna link to https://peer.tube/w/niisfGPmHx6R8FCSCBvq8Y, I can't, but the real URL https://diode.zone/videos/watch/ac7a4fc0-2284-4925-8fba-cf9c059652e6 works just fine.

Here is a similar issue on mlmym, which was fixed: rystaf/mlmym#57

@Chocobozzz
Copy link
Owner

Can you create an issue on Akkoma bug tracker and paste the issue URL?

I'm surprised that Akkoma doesn't seem to follow AP redirects. It would be much easier for users if Akkoma supported https://peer.tube/w/niisfGPmHx6R8FCSCBvq8Y URLs. For example Mastodon correctly fetches the video when using the short URL:

screen_2024-05-15-16_20_48

@snan
Copy link
Author

snan commented May 16, 2024

Seems like this is a feature the Akkoma team removed for some sorta security reason:

08:27 <sandra> Is "ActivityPub redirects" a real thing? https ://github.com//issues/6389#issuecomment-2112689320
10:17 <sandra> Maybe Lemmy also would get a li'l easier to use if this AP redirect thing were real
11:04 <FloatingGhost> that depends if the ID of the final AP object is the same as the initial URL or not
11:05 <FloatingGhost> if "AP redirect" (?) means that they've gone somewhere/id -> somewhere/id2, then it will fail
11:05 <sandra> That's definitively what they're doing, yeah
11:05 <FloatingGhost> yep then it will fail and we want it to fail
11:05 <sandra> Right
11:06 <sandra> They're saying it works on Mastodon
11:06 <sandra> They're even doing somewhere/id -> somewhere-else/id2 i.e. not even on the same server
11:07 <FloatingGhost> oh yeah that should not work
11:07 <sandra> Bridgy (not the bluesky bridge, this is another issue) and peertube are both relying on this weird "AP redirect" behavior
11:08 <FloatingGhost> this was a security issue we addressed a while back
11:08 <FloatingGhost> see https://akkoma.dev/AkkomaGang/akkoma/commit/c4cf4d7f0bb1d1082f74aea8fb54ed50160ab29e
11:09 <sandra> Thank you for digging that up.♥︎
11:09 <sandra> Can I send this chat snippet to the PeerTube dev?
11:09 <sandra> Including that link
11:12 <FloatingGhost> sure, basically they need a consistent ID to get past security checks
11:12 <FloatingGhost>
https://akkoma.dev/AkkomaGang/akkoma/commit/8684964c5d03f6c70f73730b3f1ad26784ffb004
11:12 <FloatingGhost> this may also be relevant
11:16 <FloatingGhost> this comment i think sums up the approach
11:16 <FloatingGhost> > Check whether the fetch URL (after redirects) exactly (sans tralining slash) matches either the canonical ActivityPub id or the objects url field (for display URLs from *key and Mastodon)

@Chocobozzz Chocobozzz changed the title Federation links Provide a federation link May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants