Skip to content

Conversation

@halfwit
Copy link
Member

@halfwit halfwit commented Sep 20, 2024

Don't use a leading path for http inputs

Comment on lines +53 to +54
if(preg_match("/^https?/", $input))
return "<video $attributes><source src='{$input}'></video>";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this solution as it could result in video files being embedded from remote hosts. I think if a URL is detected you should use parse_url to extract the path

Copy link

@mozai mozai Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Video files from remote hosts" is a feature not a bug; we want to use CDNs to host the video files, not just serve the video files from the sync instance ie. clients start their session with theatre.wetfish.net, but video files are served from a geolocated loadbalancing cache cdn.wetfish.net .
But there should be a better way than writing an if-exception-then. (new URL($input, $session_baseurl)).href ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mozai this is for the wiki. This has nothing to do with the sync project

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

Successfully merging this pull request may close these issues.

3 participants