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

Feature/password protected videos #5836

Merged

Conversation

wickloww
Copy link
Collaborator

Description

Enable a password protection privacy for videos.

Related issues

Fixes #620

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this PR does not update server code
  • 🙋 no, because I need help

Screenshots

Capture d’écran du 2023-06-15 12-36-34

Capture d’écran du 2023-06-15 12-30-04

client/src/app/modal/confirm.component.ts Outdated Show resolved Hide resolved
server/helpers/custom-validators/videos.ts Outdated Show resolved Hide resolved
server/tests/feeds/feeds.ts Show resolved Hide resolved
shared/server-commands/videos/captions-command.ts Outdated Show resolved Hide resolved
client/src/types/custom-error.model.ts Outdated Show resolved Hide resolved
client/src/types/custom-error.model.ts Outdated Show resolved Hide resolved
server/controllers/api/videos/token.ts Show resolved Hide resolved
server/lib/video-privacy.ts Outdated Show resolved Hide resolved
server/models/video/video-playlist-element.ts Show resolved Hide resolved
server/tests/api/check-params/video-passwords.ts Outdated Show resolved Hide resolved
server/tests/api/videos/video-static-file-privacy.ts Outdated Show resolved Hide resolved
@Chocobozzz Chocobozzz merged commit 40346ea into Chocobozzz:develop Jun 29, 2023
@JohnXLivingston
Copy link
Contributor

Hello. Seems to be a great feature!

I'm the developer of the livechat plugin. I don't have the time to test your feature in the coming days, but it want to be sure that the livechat plugin is compatible. In other words: that the chat won't be displayed before you enter the password, and that the chat url can't be guessed (so that a bad actor could join the chat, even if he did not know the password).

Would it be possible for you to test the first point? That the chat does not show up before you entered the password?

For the second point, currently the chat url contains the video UUID. So I guess it is an issue (i suppose that you can see the real video url before entering the password?). How can a plugin backend know if the current user has access to such a video? Is there any hook I can test? Any cookie? Or maybe a front-end hook so that the plugin can obtain the typed password, and send it to the backend (where a backend plugin hook can check the password?)

@wickloww
Copy link
Collaborator Author

wickloww commented Jul 4, 2023

Hi, I've just tested my feature with your plugin, it seems to work fine together.

That the chat does not show up before you entered the password?

It doesn't seem to be displayed before. The UUID of the video is not sensitive data, because the password protection of the video works like a private video, but instead of using your login details, you use a password.

@JohnXLivingston
Copy link
Contributor

JohnXLivingston commented Jul 4, 2023

Hi, I've just tested my feature with your plugin, it seems to work fine together.

Great!

The UUID of the video is not sensitive data, because the password protection of the video works like a private video, but instead of using your login details, you use a password.

What i meant was, if the video is https://videos.john-livingston.fr/videos/watch/c5d20adf-1088-4d40-bbfc-1abb42d20b05, then an attacker could guess the chat url: https://videos.john-livingston.fr/plugins/livechat/router/webchat/room/c5d20adf-1088-4d40-bbfc-1abb42d20b05. I need a way to prevent bad actors to open the chat url if he don't have the password.

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.

Password protected video
3 participants