{"record":{"id":"d3b3024721042da6","repo":"hyperledger/fabric","slug":"failed-parsing-header-d3b302","errorCode":null,"errorMessage":"failed parsing header","messagePattern":"failed parsing header","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/handlers/auth/filter/timewindow.go","lineNumber":44,"sourceCode":"type timewindowCheckFilter struct {\n\tnext       peer.EndorserServer\n\ttimeWindow time.Duration\n}\n\n// Init initializes the Filter with the next EndorserServer\nfunc (f *timewindowCheckFilter) Init(next peer.EndorserServer) {\n\tf.next = next\n}\n\nfunc validateTimewindowProposal(signedProp *peer.SignedProposal, timeWindow time.Duration) error {\n\tprop, err := protoutil.UnmarshalProposal(signedProp.ProposalBytes)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed parsing proposal\")\n\t}\n\n\thdr, err := protoutil.UnmarshalHeader(prop.Header)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed parsing header\")\n\t}\n\n\tchdr, err := protoutil.UnmarshalChannelHeader(hdr.ChannelHeader)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed parsing channel header\")\n\t}\n\n\ttimeProposal := chdr.Timestamp.AsTime().UTC()\n\tnow := time.Now().UTC()\n\n\tif timeProposal.Add(timeWindow).Before(now) || timeProposal.Add(-timeWindow).After(now) {\n\t\treturn errors.Errorf(\"request unauthorized due to incorrect timestamp %s, peer time %s, peer.authentication.timewindow %s\",\n\t\t\ttimeProposal.Format(time.RFC3339), now.Format(time.RFC3339), timeWindow.String())\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/handlers/auth/filter/timewindow.go#L26-L62","documentation":"Returned by validateTimewindowProposal when protoutil.UnmarshalHeader fails on the proposal's Header field. The proposal decoded but its header bytes are not a valid Header message, blocking the timestamp check the filter exists to perform.","triggerScenarios":"Thrown at core/handlers/auth/filter/timewindow.go:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix proposal construction to include a valid Header","Reject the malformed request"],"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"}