{"record":{"id":"07d55ec3f08c4c62","repo":"FiloSottile/age","slug":"unsupported-plugin-name-q","errorCode":null,"errorMessage":"unsupported plugin name: %q","messagePattern":"unsupported plugin name: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/plugin.go","lineNumber":249,"sourceCode":"\t\t\t// Unsupported stanzas in uni-directional phases are ignored.\n\t\t}\n\t}\n\n\tif len(recipientStrings)+len(identityStrings) == 0 {\n\t\treturn p.fatalf(\"no recipients or identities provided\")\n\t}\n\tif len(fileKeys) == 0 {\n\t\treturn p.fatalf(\"no file keys provided\")\n\t}\n\n\tvar recipients, identities []age.Recipient\n\tfor i, s := range recipientStrings {\n\t\tname, data, err := ParseRecipient(s)\n\t\tif err != nil {\n\t\t\treturn p.recipientError(i, err)\n\t\t}\n\t\tif name != p.name {\n\t\t\treturn p.recipientError(i, fmt.Errorf(\"unsupported plugin name: %q\", name))\n\t\t}\n\t\tif p.recipient == nil {\n\t\t\treturn p.recipientError(i, fmt.Errorf(\"recipient encodings not supported\"))\n\t\t}\n\t\tr, err := p.recipient(data)\n\t\tif err != nil {\n\t\t\treturn p.recipientError(i, err)\n\t\t}\n\t\trecipients = append(recipients, r)\n\t}\n\tfor i, s := range identityStrings {\n\t\tname, data, err := ParseIdentity(s)\n\t\tif err != nil {\n\t\t\treturn p.identityError(i, err)\n\t\t}\n\t\tif name != p.name {\n\t\t\treturn p.identityError(i, fmt.Errorf(\"unsupported plugin name: %q\", name))\n\t\t}","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/FiloSottile/age/blob/b74dce4cdbe35b5e5f66c06d9612b72f89028758/plugin/plugin.go#L231-L267","documentation":"In the recipient-v1 plugin protocol, each requested recipient string is parsed and its plugin name compared against the Plugin's own name. If a parsed recipient belongs to a different plugin, RecipientV1 fails that stanza with 'unsupported plugin name' — the plugin was invoked for name X but was asked to wrap a recipient for name Y.","triggerScenarios":"age invoking age-plugin-<x> with a recipient file or -r argument containing an age1<other-plugin>... recipient; mixed recipient lists in one encryption; case where ParseRecipient extracts a different name than p.name.","commonSituations":"Users passing multiple -r flags across different plugins; stale config pointing at the wrong plugin binary; a typo in the recipient's plugin name section; symlinked/renamed plugin binaries under the wrong name.","solutions":["Ensure the recipient string's plugin name matches the plugin this process was invoked as (age-plugin-<p.name>).","Filter recipient strings by prefix age1<p.name> before the plugin processes them, or better, let age dispatch each recipient to the matching plugin.","Fix the recipient's embedded name by re-encoding with plugin.EncodeRecipient under the correct name.","Check the installed binary's name matches the name passed to plugin.New."],"exampleFix":"// before\n// age-plugin-frood invoked with: age1wrongoth1qqq...\n// after\nif !strings.HasPrefix(recipientStr, \"age1\"+p.name) { skip / report to user }\nname, data, err := plugin.ParseRecipient(recipientStr)","handlingStrategy":"validation","validationCode":"for _, s := range recipientStrings {\n\tif n, _, err := plugin.ParseRecipient(s); err != nil || n != p.Name() {\n\t\t// skip or surface: this recipient belongs to another plugin\n\t}\n}","typeGuard":"func belongsToPlugin(s, pluginName string) bool {\n\tn, _, err := plugin.ParseRecipient(s)\n\treturn err == nil && n == pluginName\n}","tryCatchPattern":"name, data, err := plugin.ParseRecipient(s)\nif err != nil { return p.recipientError(i, err) }\nif name != p.name { return p.recipientError(i, fmt.Errorf(\"unsupported plugin name: %q\", name)) }","preventionTips":["Let age dispatch each recipient to its matching plugin instead of mixing in one invocation","Verify recipients carry the same plugin name as the invoked binary","Keep plugin binary names in sync with names embedded in recipients","Surface the offending recipient string in error output"],"tags":["go","age-plugin","protocol","dispatch"],"backgroundTag":"plugin-name-mismatch","analyzedSha":"b74dce4cdbe35b5e5f66c06d9612b72f89028758","analyzedAt":"2026-08-31T23:59:31.627Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}