{"record":{"id":"44a24f4a956ca62e","repo":"goharbor/harbor","slug":"invalid-input-s","errorCode":null,"errorMessage":"invalid input: %s","messagePattern":"invalid input: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/distribution/distribution.go","lineNumber":111,"sourceCode":"\tprojectName, _ := utils.ParseRepository(ParseName(path))\n\treturn projectName\n}\n\n// ParseSessionID returns session id value from distribution API URL path\nfunc ParseSessionID(path string) string {\n\tm := utils.FindNamedMatches(extractSessionIDRegexp, path)\n\tif len(m) > 0 {\n\t\treturn m[\"session_id\"]\n\t}\n\n\treturn \"\"\n}\n\n// ParseRef parse \"repository:tag\" or \"repository@digest\" into repository and reference parts\nfunc ParseRef(s string) (string, string, error) {\n\tmatches := ref.ReferenceRegexp.FindStringSubmatch(s)\n\tif matches == nil {\n\t\treturn \"\", \"\", fmt.Errorf(\"invalid input: %s\", s)\n\t}\n\n\trepository := matches[1]\n\treference := matches[2]\n\tif matches[3] != \"\" {\n\t\t_, err := digest.Parse(matches[3])\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", fmt.Errorf(\"invalid input: %s\", s)\n\t\t}\n\t\treference = matches[3]\n\t}\n\n\treturn repository, reference, nil\n}\n\n// IsDigest returns true when reference is digest\nfunc IsDigest(reference string) bool {\n\treturn ref.DigestRegexp.MatchString(reference)","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/distribution/distribution.go#L93-L129","documentation":"Error \"invalid input: %s\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/distribution/distribution.go:111 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":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}