fix: Patch potential nil pointer deference in proxy::http::client::fillRequestHeader().

This commit is contained in:
cty123 2023-07-15 23:58:08 +02:00 committed by yuhan6665
parent 929f286c2c
commit 8eb3cfe144

View File

@ -172,6 +172,10 @@ func fillRequestHeader(ctx context.Context, header []*Header) ([]*Header, error)
inbound := session.InboundFromContext(ctx)
outbound := session.OutboundFromContext(ctx)
if inbound == nil || outbound == nil {
return nil, newError("missing inbound or outbound metadata from context")
}
data := struct {
Source net.Destination
Target net.Destination