Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where id not existing in multiplexing map causes panic #16094

Merged
merged 3 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/16094.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
plugin/multiplexing: Fix panic when id doesn't exist in connection map
```
5 changes: 4 additions & 1 deletion vault/plugin_catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
jasonodonnell marked this conversation as resolved.
Show resolved Hide resolved
}

delete(extPlugin.connections, id)
if !extPlugin.multiplexingSupport {
Expand Down