Skip to content

Commit

Permalink
Better config backwards compatibility
Browse files Browse the repository at this point in the history
Previous commits added extra valid keys for the config file but just
assumed that those keys would always be present.  We will now check
to see if those keys exist, and if not we will add default values.
  • Loading branch information
timewasted committed Sep 16, 2024
1 parent 2207871 commit 30d9dd6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions acmeproxy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
# Early sanity checks
die("acme dnslib provider not found: $config->{dns_provider}\n")
unless (-f "$acme_home/dnsapi/$config->{dns_provider}.sh");
if (!exists($config->{acmesh_extra_params_install})) {
$config->{acmesh_extra_params_install} = [];
}
if (!exists($config->{acmesh_extra_params_install_cert})) {
$config->{acmesh_extra_params_install_cert} = [];
}
if (!exists($config->{acmesh_extra_params_issue})) {
$config->{acmesh_extra_params_issue} = [];
}
foreach my $auth (@{$config->{auth}}) {
if (exists($auth->{pass})) {
logg "One or more users are defined with plaintext passwords. You should convert them to bcrypt hashes!";
Expand Down

0 comments on commit 30d9dd6

Please sign in to comment.