{"record":{"id":"a00fc94253761e65","repo":"projectdiscovery/nuclei","slug":"invalid-domain-regex-s","errorCode":null,"errorMessage":"invalid domain regex: %s","messagePattern":"invalid domain regex: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/authprovider/authx/file.go","lineNumber":95,"sourceCode":"\t\treturn NewCookiesAuthStrategy(s)\n\tcase strings.EqualFold(s.Type, string(QueryAuth)):\n\t\treturn NewQueryAuthStrategy(s)\n\t}\n\treturn nil\n}\n\nfunc (s *Secret) Validate() error {\n\tif !stringsutil.EqualFoldAny(s.Type, SupportedAuthTypes()...) {\n\t\treturn fmt.Errorf(\"invalid type: %s\", s.Type)\n\t}\n\tif len(s.Domains) == 0 && len(s.DomainsRegex) == 0 {\n\t\treturn fmt.Errorf(\"domains or domains-regex cannot be empty\")\n\t}\n\tif len(s.DomainsRegex) > 0 {\n\t\tfor _, domain := range s.DomainsRegex {\n\t\t\t_, err := regexp.Compile(domain)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid domain regex: %s\", domain)\n\t\t\t}\n\t\t}\n\t}\n\n\tswitch {\n\tcase strings.EqualFold(s.Type, string(BasicAuth)):\n\t\tif s.Username == \"\" {\n\t\t\treturn fmt.Errorf(\"username cannot be empty in basic auth\")\n\t\t}\n\t\tif s.Password == \"\" {\n\t\t\treturn fmt.Errorf(\"password cannot be empty in basic auth\")\n\t\t}\n\tcase strings.EqualFold(s.Type, string(BearerTokenAuth)):\n\t\tif s.Token == \"\" {\n\t\t\treturn fmt.Errorf(\"token cannot be empty in bearer token auth\")\n\t\t}\n\tcase strings.EqualFold(s.Type, string(HeadersAuth)):\n\t\tif len(s.Headers) == 0 {","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/authprovider/authx/file.go#L77-L113","documentation":"Error \"invalid domain regex: %s\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/authprovider/authx/file.go:95 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"}