mirror of
https://github.com/acme-dns/acme-dns.git
synced 2026-04-27 04:45:48 +03:00
[GH-ISSUE #292] Bad things happen if [general] is missing #153
Labels
No labels
Documentation
Documentation
bug
enhancement
feature request
feature request
help wanted
pull-request
question
security
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/acme-dns#153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @candlerb on GitHub (Feb 21, 2022).
Original GitHub issue: https://github.com/acme-dns/acme-dns/issues/292
I found this out the hard way... I couldn't understand why acme-dns was trying to do weird stuff, like use the root domain, and then crashing:
It turns out that due to a copy-paste error I'd missed
[general]from the top of the config file. D'oh!It would be very helpful if the config parser rejected unexpected or bad settings.
@gbonnefille commented on GitHub (Feb 22, 2022):
It is generally hard to do what you request. Config files are read to find values that override default ones. To detect extra-numerous keys requires to have a schema of the configuration and validate any input against this schema. But a INI is « open » by nature.
@candlerb commented on GitHub (Feb 22, 2022):
Seems to be a limit oftoml.DecodeFilethen.OK: how about make
general.domaina mandatory setting and give a clearer error if it's missing? (e.g. "Required setting 'domain' in section '[general]' is missing")@candlerb commented on GitHub (Feb 22, 2022):
Aha, it is possible: see "Example (StrictDecoding)" at https://godocs.io/github.com/BurntSushi/toml
Something like this should do the trick:
@rhadov commented on GitHub (Mar 16, 2025):
Just noting the last error if dns beginner like me finds this
level=fatal msg="dns: bad network"yes I managed to waste hours on this googling and switching between dockerized/vm installations and arm/x86... :D