mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
REALITY config: Fix client's shortId length check (#5738)
This commit is contained in:
@@ -940,7 +940,7 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
|
|||||||
if len(c.ShortIds) != 0 {
|
if len(c.ShortIds) != 0 {
|
||||||
return nil, errors.New(`non-empty "shortIds", please use "shortId" instead`)
|
return nil, errors.New(`non-empty "shortIds", please use "shortId" instead`)
|
||||||
}
|
}
|
||||||
if len(c.ShortIds) > 16 {
|
if len(c.ShortId) > 16 {
|
||||||
return nil, errors.New(`too long "shortId": `, c.ShortId)
|
return nil, errors.New(`too long "shortId": `, c.ShortId)
|
||||||
}
|
}
|
||||||
config.ShortId = make([]byte, 8)
|
config.ShortId = make([]byte, 8)
|
||||||
|
|||||||
Reference in New Issue
Block a user