{"record":{"id":"d8ee5dd71e6144ad","repo":"projectdiscovery/nuclei","slug":"raw-cookie-cannot-be-empty","errorCode":null,"errorMessage":"raw cookie cannot be empty","messagePattern":"raw cookie cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/authprovider/authx/file.go","lineNumber":189,"sourceCode":"func (c *Cookie) Validate() error {\n\tif c.Raw != \"\" {\n\t\treturn nil\n\t}\n\tif c.Key == \"\" {\n\t\treturn fmt.Errorf(\"key cannot be empty\")\n\t}\n\tif c.Value == \"\" {\n\t\treturn fmt.Errorf(\"value cannot be empty\")\n\t}\n\treturn nil\n}\n\n// Parse parses the cookie\n// in raw the cookie is in format of\n// Set-Cookie: <cookie-name>=<cookie-value>; Expires=<date>; Path=<path>; Domain=<domain_name>; Secure; HttpOnly\nfunc (c *Cookie) Parse() error {\n\tif c.Raw == \"\" {\n\t\treturn fmt.Errorf(\"raw cookie cannot be empty\")\n\t}\n\ttmp := strings.TrimPrefix(c.Raw, \"Set-Cookie: \")\n\tslice := strings.Split(tmp, \";\")\n\tif len(slice) == 0 {\n\t\treturn fmt.Errorf(\"invalid raw cookie no ; found\")\n\t}\n\t// first element is the cookie name and value\n\tcookie := strings.Split(slice[0], \"=\")\n\tif len(cookie) == 2 {\n\t\tc.Key = cookie[0]\n\t\tc.Value = cookie[1]\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"invalid raw cookie: %s\", c.Raw)\n}\n\n// GetAuthDataFromFile reads the auth data from file\nfunc GetAuthDataFromFile(file string) (*Authx, error) {","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/authprovider/authx/file.go#L171-L207","documentation":"Error \"raw cookie cannot be empty\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/authprovider/authx/file.go:189 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":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}