mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-02 00:17:02 +00:00
QUIC sniffer: Don't accept ClientHello with gaps in CRYPTO data (#7292)
https://github.com/XTLS/Xray-core/pull/7292#pullrequestreview-5712194488 --------- Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com>
This commit is contained in:
@@ -101,6 +101,10 @@ func ReadClientHello(data []byte, h *SniffHeader) error {
|
||||
return errNotClientHello
|
||||
}
|
||||
if nameType == 0 {
|
||||
// RFC 6066 requires a non-empty HostName.
|
||||
if nameLen == 0 {
|
||||
return errNotClientHello
|
||||
}
|
||||
// QUIC separated across packets
|
||||
// May cause the serverName to be incomplete
|
||||
b := byte(0)
|
||||
|
||||
Reference in New Issue
Block a user