Error if installed plugin is inside plugins folder#137398
Error if installed plugin is inside plugins folder#137398mamazzol merged 9 commits intoelastic:mainfrom
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. |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
* Error if installed plugin is inside plugins folder 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 (cherry picked from commit 941f302)
* Error if installed plugin is inside plugins folder 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 (cherry picked from commit 941f302)
* Error if installed plugin is inside plugins folder 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 #27401
* Error if installed plugin is inside plugins folder 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 #27401
* Error if installed plugin is inside plugins folder 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 #27401
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