Allow empty "shortId" (client side)

This commit is contained in:
RPRX 2023-02-17 12:39:18 +00:00 committed by GitHub
parent 82003f28b2
commit e1cd1fd33e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)