{"record":{"id":"e5873ac3cfb74b1a","repo":"XTLS/Xray-core","slug":"invalid-shortids","errorCode":null,"errorMessage":"invalid \"shortIds[","messagePattern":"invalid \"shortIds\\[","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/transport_security.go","lineNumber":145,"sourceCode":"\t\t\t\t}\n\t\t\t\tif u, err = strconv.ParseUint(s, 10, 8); err != nil {\n\t\t\t\t\treturn nil, errors.New(`\"maxClientVer[`, i, `]\" should be less than 256`)\n\t\t\t\t} else {\n\t\t\t\t\tconfig.MaxClientVer[i] = byte(u)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif len(c.ShortIds) == 0 {\n\t\t\treturn nil, errors.New(`empty \"shortIds\"`)\n\t\t}\n\t\tconfig.ShortIds = make([][]byte, len(c.ShortIds))\n\t\tfor i, s := range c.ShortIds {\n\t\t\tif len(s) > 16 {\n\t\t\t\treturn nil, errors.New(`too long \"shortIds[`, i, `]\": `, s)\n\t\t\t}\n\t\t\tconfig.ShortIds[i] = make([]byte, 8)\n\t\t\tif _, err = hex.Decode(config.ShortIds[i], []byte(s)); err != nil {\n\t\t\t\treturn nil, errors.New(`invalid \"shortIds[`, i, `]\": `, s)\n\t\t\t}\n\t\t}\n\t\tconfig.Dest = s\n\t\tconfig.Type = c.Type\n\t\tconfig.Xver = c.Xver\n\t\tconfig.ServerNames = c.ServerNames\n\t\tconfig.MaxTimeDiff = c.MaxTimeDiff\n\n\t\tif c.Mldsa65Seed != \"\" {\n\t\t\tif c.Mldsa65Seed == c.PrivateKey {\n\t\t\t\treturn nil, errors.New(`\"mldsa65Seed\" and \"privateKey\" can not be the same value: `, c.Mldsa65Seed)\n\t\t\t}\n\t\t\tif config.Mldsa65Seed, err = base64.RawURLEncoding.DecodeString(c.Mldsa65Seed); err != nil || len(config.Mldsa65Seed) != 32 {\n\t\t\t\treturn nil, errors.New(`invalid \"mldsa65Seed\": `, c.Mldsa65Seed)\n\t\t\t}\n\t\t}\n\n\t\tfor _, sn := range config.ServerNames {","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/transport_security.go#L127-L163","documentation":"Error \"invalid \"shortIds[\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at infra/conf/transport_security.go:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}