Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
12.94k stars 1.49k forks source link

Sharing a video gives link to current instance instead of original instance for unfollowed videos #3320

Open emersion opened 3 years ago

emersion commented 3 years ago

Describe the current behavior Sharing a video hosted on another instance gives a link to the current instance. When embedded, this gives a 403.

Steps to reproduce:

  1. Go to https://spacepub.space/videos/watch/playlist/37f559f3-5adb-4220-a5c0-cb817b31adef?videoId=c023f9e8-0bae-4aa1-ac91-bfc5f21c46aa
  2. Click "Share"
  3. Click "Embed"
  4. Copy-paste in any website
  5. The iframe doesn't load correctly: the server returns a 403 with the message: "Cannot get this video regarding follow constraints."

Describe the expected behavior

The iframe should load properly.

Additional information

I think the share menu should always give a link to the original instance if CONFIG.SEARCH.REMOTE_URI.ANONYMOUS isn't set. Maybe it should also give a link to the original instance if CONFIG.SEARCH.REMOTE_URI.ANONYMOUS is set, because the admin may change that setting in the future (thus breaking all iframes).

Alternatively, maybe instead of sending a 403, PeerTube could perform a redirection to the original instance.

Chocobozzz commented 3 years ago

Alternatively, maybe instead of sending a 403, PeerTube could perform a redirection to the original instance.

I don't think admins want to redirect on unknown instances.

Niquarl commented 3 years ago

Perhaps a simple way would be to use the instances that the admin is following/federating with as an allowlist for redirecting. Another option would be to do like Steam, Discord etc do and have a warning asking to confirm that you do want to go to that other website (with URL visible).

JigmeDatse commented 3 years ago

I'd almost rather have it be something which I do manually. Like, have to go to the instance, in order to get the link directly to that instance. I get the advantage of having ways of handling it more automatically, but I'm not sure I would expect that would handle well enough the problem of being able to decide what instance to link through.

Not saying it's not a good idea, more that I'd really be careful about how to implement it.