libobs, frontend: Reject non-default modules in obs-plugins directory#12311
libobs, frontend: Reject non-default modules in obs-plugins directory#12311cg2121 wants to merge 1 commit intoobsproject:masterfrom
Conversation
If a third party plugin is in the OBS main directory, and OBS is not in portable mode, reject the plugin.
|
I'm afraid we need a more holistic solution to untangle the mess OBS Studio has navigated itself into and not a solution (particularly as the plugin location for portable mode also needs to change). What needs to happen is that module loading (as an initialisation unit) needs to be split up into two phases:
That establishes an architectural foundation to even start separating core modules from plugins and allows the next steps:
This would ensure that:
I am aware that this does not fix the issue of a new version of a plugin (designed to work from the program data directory on Windows) not being loaded because an older version still exists in the Plugin developers will have to do the same thing that OBS Studio has to do when the changes above are implemented:
|
|
Please consider that some people may intentionally replace first-party plugins (say, to troubleshoot older or newer hardware encoder implementations). If there are going to be separate folders for first-party and third-party plugins, if a plugin is present in the folder meant for third-party plugins, third party plugin should be loaded instead of the first-party plugin of the same name. |
Replacement of core modules has never been and will not be considered a supported use case. That it is possible to do so right now is a loophole of the module loading system and it is unfortunate that it hasn't been fixed earlier. That's also why at some point the core modules might also be checked against hash values or other fingerprints to give the project and its volunteers the choice of whether they have the capacity to support users that have actively tampered with an installation. |
|
While this is a step in the right direction, we are not prepared to make a hard cut like this. There needs to be a transition period as well, as this is effectively the primary method that users install plugins with. This is going to need a lot more discussion and proper design/planning to handle correctly, and Pat's explanation above is what I would like to see. As such, going to close this for now until the groundwork is in place first. |
Description
If a third party plugin is in the OBS main directory, and OBS is not in portable mode, reject the plugin.
Motivation and Context
Replaces #12290
How Has This Been Tested?
Loaded third party plugin in main directory and made sure it wasn't loaded.
Types of changes
Checklist: