{"record":{"id":"9b5582a43d89e205","repo":"hyperledger/fabric","slug":"empty-payload","errorCode":null,"errorMessage":"Empty payload","messagePattern":"Empty payload","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gossip/protoext/signing.go","lineNumber":133,"sourceCode":"\t}\n\n\te := &gossip.Envelope{\n\t\tPayload:        payload,\n\t\tSignature:      sig,\n\t\tSecretEnvelope: secretEnvelope,\n\t}\n\tm.Envelope = e\n\treturn e, nil\n}\n\n// Verify verifies a signed GossipMessage with a given Verifier.\n// Returns nil on success, error on failure.\nfunc (m *SignedGossipMessage) Verify(peerIdentity []byte, verify Verifier) error {\n\tif m.Envelope == nil {\n\t\treturn errors.New(\"Missing envelope\")\n\t}\n\tif len(m.Envelope.Payload) == 0 {\n\t\treturn errors.New(\"Empty payload\")\n\t}\n\tif len(m.Envelope.Signature) == 0 {\n\t\treturn errors.New(\"Empty signature\")\n\t}\n\tpayloadSigVerificationErr := verify(peerIdentity, m.Envelope.Signature, m.Envelope.Payload)\n\tif payloadSigVerificationErr != nil {\n\t\treturn payloadSigVerificationErr\n\t}\n\tif m.Envelope.SecretEnvelope != nil {\n\t\tpayload := m.Envelope.SecretEnvelope.Payload\n\t\tsig := m.Envelope.SecretEnvelope.Signature\n\t\tif len(payload) == 0 {\n\t\t\treturn errors.New(\"Empty payload\")\n\t\t}\n\t\tif len(sig) == 0 {\n\t\t\treturn errors.New(\"Empty signature\")\n\t\t}\n\t\treturn verify(peerIdentity, sig, payload)","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/gossip/protoext/signing.go#L115-L151","documentation":"Guard in SignedGossipMessage.Verify: the envelope exists but its Payload byte slice is empty, so there is no signed content to verify. A zero-length payload means the envelope was created incorrectly or truncated.","triggerScenarios":"Thrown at gossip/protoext/signing.go:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reject envelopes with empty payloads at ingestion time (EnvelopeToGossipMessage callers) before reaching Verify","Ensure message producers marshal the GossipMessage into the envelope payload before signing","Log and drop the offending message rather than treating it as a verification failure of a peer's identity"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}