mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-10 02:53:11 +00:00
fix: Patch potential nil pointer deference in proxy::http::client::fillRequestHeader().
This commit is contained in:
parent
929f286c2c
commit
8eb3cfe144
|
@ -172,6 +172,10 @@ func fillRequestHeader(ctx context.Context, header []*Header) ([]*Header, error)
|
||||||
inbound := session.InboundFromContext(ctx)
|
inbound := session.InboundFromContext(ctx)
|
||||||
outbound := session.OutboundFromContext(ctx)
|
outbound := session.OutboundFromContext(ctx)
|
||||||
|
|
||||||
|
if inbound == nil || outbound == nil {
|
||||||
|
return nil, newError("missing inbound or outbound metadata from context")
|
||||||
|
}
|
||||||
|
|
||||||
data := struct {
|
data := struct {
|
||||||
Source net.Destination
|
Source net.Destination
|
||||||
Target net.Destination
|
Target net.Destination
|
||||||
|
|
Loading…
Reference in a new issue