Commit dc93b4d
authored
Error if installed plugin is inside plugins folder (elastic#137398) (elastic#137507)
* 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#274011 parent 834fbc0 commit dc93b4d
File tree
3 files changed
+54
-9
lines changed- distribution/tools/plugin-cli/src
- main/java/org/elasticsearch/plugins/cli
- test/java/org/elasticsearch/plugins/cli
- docs/changelog
3 files changed
+54
-9
lines changeddistribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/InstallPluginAction.java
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
332 | 336 | | |
333 | 337 | | |
334 | 338 | | |
335 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
336 | 358 | | |
337 | 359 | | |
338 | 360 | | |
| |||
462 | 484 | | |
463 | 485 | | |
464 | 486 | | |
465 | | - | |
| 487 | + | |
466 | 488 | | |
467 | | - | |
| 489 | + | |
468 | 490 | | |
469 | 491 | | |
470 | 492 | | |
| |||
548 | 570 | | |
549 | 571 | | |
550 | 572 | | |
| 573 | + | |
551 | 574 | | |
552 | 575 | | |
553 | | - | |
| 576 | + | |
554 | 577 | | |
555 | 578 | | |
556 | 579 | | |
| |||
Lines changed: 22 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | | - | |
74 | 72 | | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | | - | |
556 | | - | |
| 555 | + | |
| 556 | + | |
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
589 | 605 | | |
590 | 606 | | |
591 | 607 | | |
592 | | - | |
593 | | - | |
| 608 | + | |
| 609 | + | |
594 | 610 | | |
595 | 611 | | |
596 | 612 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments