mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
Allow empty "shortId" (client side)
This commit is contained in:
parent
82003f28b2
commit
e1cd1fd33e
1 changed files with 0 additions and 3 deletions
|
@ -637,9 +637,6 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
|
|||
if config.PublicKey, err = base64.RawURLEncoding.DecodeString(c.PublicKey); err != nil || len(config.PublicKey) != 32 {
|
||||
return nil, newError(`invalid "publicKey": `, c.PublicKey)
|
||||
}
|
||||
if c.ShortId == "" {
|
||||
return nil, newError(`empty "shortId"`)
|
||||
}
|
||||
config.ShortId = make([]byte, 8)
|
||||
if _, err = hex.Decode(config.ShortId, []byte(c.ShortId)); err != nil {
|
||||
return nil, newError(`invalid "shortId": `, c.ShortId)
|
||||
|
|
Loading…
Reference in a new issue