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

Add confirmation for 3rd party repos #4654

Merged

Conversation

joshuaboniface
Copy link
Member

Changes

Adds a confirmation similar to the one performed during plugin installation, when adding a 3rd party repository.

The safe domain is hardcoded to be "repo.jellyfin.org" as this is very stable and we have no plans to change it. Individual mirrors don't need to be specified since this is user-input content and they should be using the main URL not the URL of a specific mirror.

The confirmation message makes explicit mention of the possibility of malicious code from 3rd party repositories as well as updates that may bring it in, and suggests only adding 3rd parties from trusted people.

The plugin install confirmation is also modified to use the same conditional and an altered message similar to the above, again to emphasize the potential security risks of 3rd party plugins.

I am open to modifications to the wording of both messages in this PR, though I think this wording captures it fairly well.

Finally, some additional information is added to the Developer Info section of the plugin page; specifically, the name of the repository the plugin is sourced from as well as its URL. How this is obtained is a hack, since these should probably be part of the main information about the plugin and not each specific version, but this is worked around by only showing the information from the first (i.e. newest) version.

Issues
Fixes #4653

Adds a confirmation similar to the one performed during plugin
installation, when adding a 3rd party repository.

The safe domain is hardcoded to be "repo.jellyfin.org" as this is very
stable and we have no plans to change it. Individual mirrors don't need
to be specified since this is user-input content and they should be
using the main URL not the URL of a specific mirror.

The confirmation message makes explicit mention of the possibility of
malicious code from 3rd party repositories as well as updates that may
bring it in, and suggests only adding 3rd parties from trusted people.

The plugin install confirmation is also modified to use the same
conditional and an altered message similar to the above, again to
emphasize the potential security risks of 3rd party plugins.

Finally, some additional information is added to the Developer Info
section of the plugin page; specifically, the name of the repository the
plugin is sourced from as well as its URL. How this is obtained is a
hack, since these should probably be part of the main information about
the plugin and not each specific version, but this is worked around by
only showing the information from the first (i.e. newest) version.
@joshuaboniface joshuaboniface added the stable backport Backport into the next stable release label May 29, 2023
@joshuaboniface joshuaboniface added this to Active PRs in Release 10.8.0 via automation May 29, 2023
src/controllers/dashboard/plugins/add/index.html Outdated Show resolved Hide resolved
src/controllers/dashboard/plugins/add/index.js Outdated Show resolved Hide resolved
src/controllers/dashboard/plugins/add/index.js Outdated Show resolved Hide resolved
src/controllers/dashboard/plugins/repositories/index.js Outdated Show resolved Hide resolved
* Remove superfluous variable
* Remove extra random spaces from editor
* Use single-quotes around text
joshuaboniface and others added 3 commits May 30, 2023 10:13
Co-authored-by: Niels van Velzen <nielsvanvelzen@users.noreply.github.com>
@thornbill thornbill modified the milestones: v10.9.0, v10.8.11 May 31, 2023
@thornbill thornbill added enhancement Improve existing functionality or small fixes security This PR or issue mainly concerns security labels May 31, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Release 10.8.0 automation moved this from Active PRs to Approved PRs Jul 1, 2023
@thornbill thornbill merged commit 331fa87 into jellyfin:release-10.8.z Jul 1, 2023
15 checks passed
Release 10.8.0 automation moved this from Approved PRs to Completed PRs Jul 1, 2023
@jellyfin-bot jellyfin-bot moved this from Completed PRs to Jellyfinished in Release 10.8.0 Jul 2, 2023
@jellyfin-bot jellyfin-bot removed the stable backport Backport into the next stable release label Jul 2, 2023
thornbill pushed a commit that referenced this pull request Jul 2, 2023
Add confirmation for 3rd party repos

Original-merge: 331fa87

Merged-by: Bill Thornton <thornbill@users.noreply.github.com>

Backported-by: Bill Thornton <thornbill@users.noreply.github.com>
@joshuaboniface joshuaboniface deleted the additionalPluginVerification branch July 3, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or small fixes security This PR or issue mainly concerns security
Projects
No open projects
Release 10.8.0
  
Jellyfinished
Development

Successfully merging this pull request may close these issues.

None yet

4 participants