headscale/hscontrol
Kristoffer Dalby d6dfdc100c hscontrol: route hostname handling through dnsname and NodeStore
Ingest (registration and MapRequest updates) now calls
dnsname.SanitizeHostname directly and lets NodeStore auto-bump on
collision. Admin rename uses dnsname.ValidLabel + SetGivenName so
conflicts are surfaced to the caller instead of silently mutated.

Three duplicate invalidDNSRegex definitions, the old NormaliseHostname
and ValidateHostname helpers, EnsureHostname, InvalidString,
ApplyHostnameFromHostInfo, GivenNameHasBeenChanged, generateGivenName
and EnsureUniqueGivenName are removed along with their tests.
ValidateHostname's username half is retained as ValidateUsername for
users.go.

The SaaS-matching collision rule replaces the random "invalid-xxxxxx"
fallback and the 8-character hash suffix; the empty-input fallback is
the literal "node". TestUpdateHostnameFromClient now exercises the
rewrite end-to-end with awkward macOS/Windows names.

Fixes #3188
Fixes #2926
Fixes #2343
Fixes #2762
Fixes #2449
Updates #2177
Updates #2121
Updates #363
2026-04-18 15:12:21 +01:00
..
assets assets: fix logo alignment and error icon centering 2026-04-13 17:23:47 +01:00
capver capver: regenerate for tailscale v1.96 2026-04-08 13:00:22 +01:00
db hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
derp all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
dns Fix typo in comment about fsnotify behavior 2026-02-27 15:23:06 +01:00
mapper hscontrol/types: silence zerolog by default in tests 2026-04-17 16:31:49 +01:00
policy Update links to Tailscale documentation 2026-04-18 09:33:41 +02:00
routes routes: add health dimension to HA primary route election 2026-04-16 15:10:56 +01:00
servertest servertest: add dynamic HA failover tests 2026-04-17 16:31:49 +01:00
state hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
templates Update links to Tailscale documentation 2026-04-18 09:33:41 +02:00
types hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
util hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
app.go app: add security headers middleware 2026-04-17 16:31:49 +01:00
app_test.go app: add security headers middleware 2026-04-17 16:31:49 +01:00
auth.go hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
auth_tags_test.go state: replace zcache with bounded LRU for auth cache 2026-04-10 14:09:57 +01:00
auth_test.go hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
debug.go debug: explain URLIsNoise choice in ping callback 2026-04-17 16:31:49 +01:00
grpcv1.go state: replace zcache with bounded LRU for auth cache 2026-04-10 14:09:57 +01:00
grpcv1_test.go hscontrol: add tests for SetTags user_id database persistence 2026-04-08 14:32:08 +01:00
handlers.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
handlers_test.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
metrics.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
noise.go noise: reject non-HEAD on PingResponseHandler 2026-04-17 16:31:49 +01:00
noise_test.go policy/v2: align SSH check action with SaaS wire format 2026-04-17 16:31:49 +01:00
oidc.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
oidc_confirm_test.go oidc: add confirmation page for node registration 2026-04-10 14:09:57 +01:00
oidc_template_test.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
oidc_test.go oidc: make email verification configurable 2025-12-18 11:42:32 +00:00
platform_config.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
poll.go types: add node.expiry config, deprecate oidc.expiry 2026-04-08 13:00:22 +01:00
poll_test.go poll: fix poll test linter violations 2026-03-12 01:27:34 -07:00
tailsql.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
templates_consistency_test.go Update links to Tailscale documentation 2026-04-18 09:33:41 +02:00