diff --git a/changelog/16094.txt b/changelog/16094.txt new file mode 100644 index 000000000..edb10600d --- /dev/null +++ b/changelog/16094.txt @@ -0,0 +1,3 @@ +```release-note:bug +plugin/multiplexing: Fix panic when id doesn't exist in connection map +``` \ No newline at end of file diff --git a/vault/plugin_catalog.go b/vault/plugin_catalog.go index dcfa95203..9caaa2410 100644 --- a/vault/plugin_catalog.go +++ b/vault/plugin_catalog.go @@ -157,7 +157,10 @@ func (c *PluginCatalog) cleanupExternalPlugin(name, id string) error { return fmt.Errorf("plugin client not found") } - pc := extPlugin.connections[id] + pc, ok := extPlugin.connections[id] + if !ok { + return fmt.Errorf("plugin connection not found") + } delete(extPlugin.connections, id) if !extPlugin.multiplexingSupport {