mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
fix: Patch potential nil pointer deference in proxy::http::client::fillRequestHeader().
This commit is contained in:
parent
929f286c2c
commit
8eb3cfe144
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue