{"record":{"id":"339f99e8213908e5","repo":"tailscale/tailscale","slug":"invalid-domain","errorCode":null,"errorMessage":"invalid domain","messagePattern":"invalid domain","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"feature/acme/cert.go","lineNumber":99,"sourceCode":"func (e *extension) getCertPEMWithValidity(ctx context.Context, b *ipnlocal.LocalBackend, domain string, minValidity time.Duration) (*ipnlocal.TLSCertKeyPair, error) {\n\te.mu.Lock()\n\tgetCertForTest := e.getCertForTest\n\te.mu.Unlock()\n\n\tif getCertForTest != nil {\n\t\ttestenv.AssertInTest()\n\t\treturn getCertForTest(domain)\n\t}\n\n\t// Trim a trailing dot from the domain (e.g. from an SNI ServerName of\n\t// \"host.ts.net.\") before lookup. Per RFC 6066 §3 the SNI HostName has\n\t// no trailing dot, but some clients send a fully-qualified name with\n\t// one, and cert store names have no trailing dot. See\n\t// https://github.com/tailscale/tailscale/issues/10233.\n\tdomain = strings.TrimSuffix(domain, \".\")\n\n\tif !validLookingCertDomain(domain) {\n\t\treturn nil, errors.New(\"invalid domain\")\n\t}\n\n\tcertDomain, err := e.resolveCertDomain(b, domain)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlogf := logger.WithPrefix(b.Logger(), fmt.Sprintf(\"cert(%q): \", domain))\n\tnow := b.Clock().Now()\n\ttraceACME := func(v any) {\n\t\tif !acmeDebug() {\n\t\t\treturn\n\t\t}\n\t\tj, _ := json.MarshalIndent(v, \"\", \"\\t\")\n\t\tlog.Printf(\"acme %T: %s\", v, j)\n\t}\n\n\tcs, err := e.getCertStore(b)\n\tif err != nil {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/tailscale/tailscale/blob/cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042/feature/acme/cert.go#L81-L117","documentation":"Error \"invalid domain\" thrown in tailscale/tailscale.","triggerScenarios":"Thrown at feature/acme/cert.go:99 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":"cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042","analyzedAt":"2026-08-15T19:58:31.583Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}