mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-11 04:25:33 -04:00
A custom domain row was bound to a live service whether or not its CNAME validation ever succeeded: extractClusterFromCustomDomains matched on the name alone, so an account that never proved DNS control still had its hostname routed. Cluster derivation now matches only validated rows and reports "domain is not validated" instead of the generic no-cluster message. Service updates no longer fall back to the previously derived cluster when derivation fails, which was a way around the same check. The unique index on the domain column already prevents two accounts holding the same name, but the violation surfaced as an internal error. Creation now pre-checks and returns AlreadyExists so the caller gets a 409, and the message does not say which account holds the domain.