{"record":{"id":"11db791d234d7446","repo":"goharbor/harbor","slug":"invalid-oidc-session-data-format","errorCode":null,"errorMessage":"invalid OIDC session data format","messagePattern":"invalid OIDC session data format","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"src/core/controllers/oidc.go","lineNumber":280,"sourceCode":"\toidcSettings, err := config.OIDCSetting(ctx)\n\tif err != nil {\n\t\tlog.Errorf(\"Failed to get OIDC settings: %v\", err)\n\t\toc.SendInternalServerError(err)\n\t\treturn\n\t}\n\tif oidcSettings == nil {\n\t\tlog.Error(\"OIDC settings is missing.\")\n\t\toc.SendInternalServerError(fmt.Errorf(\"OIDC settings is missing\"))\n\t\treturn\n\t}\n\tif !oidcSettings.Logout {\n\t\toc.Controller.Redirect(\"/account/sign-in\", http.StatusFound)\n\t\treturn\n\t}\n\ttk, ok := sessionData.([]byte)\n\tif !ok {\n\t\tlog.Error(\"Invalid OIDC session data format.\")\n\t\toc.SendInternalServerError(fmt.Errorf(\"invalid OIDC session data format\"))\n\t\treturn\n\t}\n\ttoken := oidc.Token{}\n\tif err := json.Unmarshal(tk, &token); err != nil {\n\t\tlog.Errorf(\"Error occurred in Unmarshal: %v\", err)\n\t\toc.SendInternalServerError(err)\n\t\treturn\n\t}\n\tif token.RefreshToken != \"\" {\n\t\tsessionType, err := getSessionType(token.RefreshToken)\n\t\tif err == nil {\n\t\t\t// If the session is offline, try best to revoke the refresh token.\n\t\t\tif strings.ToLower(sessionType) == \"offline\" && oidc.EndpointsClaims.RevokeURL != \"\" {\n\t\t\t\tif err := oidc.RevokeOIDCRefreshToken(oidc.EndpointsClaims.RevokeURL, token.RefreshToken, oidcSettings.ClientID, oidcSettings.ClientSecret, oidcSettings.VerifyCert); err != nil {\n\t\t\t\t\tlog.Warningf(\"Failed to revoke the offline session: %v\", err)\n\t\t\t\t}\n\t\t\t}\n\t\t}","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/core/controllers/oidc.go#L262-L298","documentation":"Error \"invalid OIDC session data format\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/core/controllers/oidc.go:280 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"}