-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Error if installed plugin is inside plugins folder #137398
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
Conversation
If a non directory file is in the plugins folder during installation, there will be a non descriptive error during findBundle, as it assumes everything is a directory. This new preemptive check adds a descripive error message to avoid this scenario. Also, for consistency and to not use a deprecated URL constructor, in the download method we now use URI. Closes elastic#27401
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
|
Hi @mamazzol, I've created a changelog YAML for you. |
...bution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/InstallPluginAction.java
Outdated
Show resolved
Hide resolved
...n/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/InstallPluginActionTests.java
Outdated
Show resolved
Hide resolved
|
FWIW, is there a reason this isn't allowed? Did we consider simply removing this limitation? |
We want to maintain control of what is in the plugins directory. Otherwise we would have to have leniency that could hide an error (eg broken plugin installation, looks like the plugin is there but it's not complete, etc) |
At the moment it's stopped by the "bug/feature" present here.
Perhaps |
Sounds like we want to keep the existing behavior of preventing folks from installing plugins located inside the plugins dir. |
If a non directory file is in the plugins folder during installation, there will be a non descriptive error during findBundle, as it assumes everything is a directory. This new preemptive check adds a descriptive error message to avoid this scenario.
Also, for consistency and to not use a deprecated URL constructor, in the download method we now use URI.
Closes #27401