File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
distribution/tools/plugin-cli/src
main/java/org/elasticsearch/plugins/cli
test/java/org/elasticsearch/plugins/cli Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ private void verifyLocationNotInPluginsDirectory(String pluginLocation) throws U
349349 if (pluginRealPath .startsWith (pluginsDirectory )) {
350350 throw new UserException (
351351 ExitCodes .USAGE ,
352- "plugin location [" + pluginLocation + "] is inside the plugins directory [" + pluginsDirectory + "] "
352+ "Installation of plugin in location [" + pluginLocation + "] from inside the plugins directory is not permitted. "
353353 );
354354 }
355355 }
Original file line number Diff line number Diff line change @@ -586,7 +586,7 @@ public void testSpaceInUrl() throws Exception {
586586 assertPlugin ("fake" , pluginDir , env .v2 ());
587587 }
588588
589- public void testInstallFromInsidePluginsDirectory () throws Exception {
589+ public void testCannotInstallFromInsidePluginsDirectory () throws Exception {
590590 InstallablePlugin pluginZip = createPluginZip ("fake" , pluginDir );
591591 Path pluginZipInsidePlugins = env .v2 ().pluginsDir ().resolve ("fake.zip" );
592592 try (InputStream in = FileSystemUtils .openFileURLStream (new URL (pluginZip .getLocation ()))) {
@@ -596,7 +596,7 @@ public void testInstallFromInsidePluginsDirectory() throws Exception {
596596 assumeTrue ("requires file URL scheme" , location .startsWith ("file:" ));
597597 InstallablePlugin modifiedPlugin = new InstallablePlugin ("fake" , location );
598598 UserException e = expectThrows (UserException .class , () -> installPlugin (modifiedPlugin ));
599- assertThat (e .getMessage (), startsWith ("plugin location [" + location + "] is inside the plugins directory" ));
599+ assertThat (e .getMessage (), startsWith ("Installation of plugin in location [" + location + "] from inside the plugins directory is not permitted. " ));
600600 }
601601
602602 public void testMalformedUrlNotMaven () {
You can’t perform that action at this time.
0 commit comments