config: a metrics username without a password stops startup (closes #268) #277

Merged
clawbot merged 1 commits from fix/268-metrics-password into next 2026-10-13 19:10:59 +02:00
1 Commits
Author SHA1 Message Date
sneak bd0b186cf2 config: a metrics username without a password stops startup (closes #268)
check / check (push) Waiting to run
DNSWATCHER_METRICS_USERNAME turns on /metrics, and its Basic Auth used
DNSWATCHER_METRICS_PASSWORD as it was, empty included, so the username
with an empty password got in. config.New now refuses a username
without a password with ErrNoMetricsPassword, whose message names both
variables. The README's variable table says the password is required
with the username.

Judgement call: the check is in New, after buildConfig, since it
compares two settings buildConfig has already read; buildConfig is
also at the linter's length limit.

Model: opus-5-5
2026-10-13 17:00:35 +00:00