Commit 0f5a2c7
fix(management): guard against IndexOutOfRangeException for K8SNS/K8SCluster alias parsing
HandleCreateOrUpdate (namespace case) and HandleRemove both accessed splitAlias[^2]
without a bounds check. An alias without the expected '/' delimiter (e.g. a bare
alias like 'testcert') produced a single-element array, causing
'Index was outside the bounds of the array' at runtime.
Added Length guards before all splitAlias[^2]/splitAlias[^1] accesses in both
methods for K8SNS and K8SCluster store types; returns a clear FailJob with an
actionable error message describing the expected alias format.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 82ad516 commit 0f5a2c7
1 file changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
551 | 559 | | |
552 | 560 | | |
553 | 561 | | |
| |||
656 | 664 | | |
657 | 665 | | |
658 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
659 | 673 | | |
660 | 674 | | |
661 | 675 | | |
| |||
666 | 680 | | |
667 | 681 | | |
668 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
669 | 689 | | |
670 | 690 | | |
671 | 691 | | |
| |||
0 commit comments