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

Provide a way to disable automatic loading plugins from LIBHEIF_PLUGIN_DIRECTORY #1122

Open
bigcat88 opened this issue Feb 2, 2024 · 0 comments

Comments

@bigcat88
Copy link
Contributor

bigcat88 commented Feb 2, 2024

Why is it important?

At the moment there is no way to turn this off, which may result in unnecessary libraries being loaded, and they will by default have a higher priority than the software that comes with the libheif, what will cause a very tricker debug why for specific cases your code work not as expected.
Also from security reason this is not a good way to load a libraries from path that you cannot control.

This can be implemented s as a flag in heif_init or as a compile-time flag.

From my pow, the environment variable “LIBHEIF_PLUGIN_PATH” is ok; it is not necessary to cancel loading from it, because if you really need, you can just remove it or make empty before calling heif_init, so at least here control for what can be loaded is present.


Also, in order not to create a small question(perhaps the answer should be put in the readme), what will happen in such a situation:

  1. Libheif loads version 1.0.0 of the XXX encoder during heif_init (for example such encoder is in LIBHEIF_PLUGIN_PATH)
  2. After this, a call occurs to heif_load_plugin on version 1.1.0 of the XXX encoder that are in a separate custom folder

What the expected as a result in this situation?

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

No branches or pull requests

1 participant