]> git.proxmox.com Git - pve-manager.git/commitdiff
acme: fix account parsing
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 16 Apr 2020 17:42:27 +0000 (19:42 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 3 May 2020 12:10:17 +0000 (14:10 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/ACME.pm
PVE/NodeConfig.pm

index d215739b021f5cf68b4b02171db3be0d506fb82c..c116712d0d0195e10d756b25be3810ca030fecf6 100644 (file)
@@ -223,7 +223,7 @@ __PACKAGE__->register_method ({
 
        my $realcmd = sub {
            STDOUT->autoflush(1);
-           my $account = $acme_node_config->{account} // 'default';
+           my $account = $acme_node_config->{account};
            my $account_file = "${acme_account_dir}/${account}";
            die "ACME account config file '$account' does not exist.\n"
                if ! -e $account_file;
@@ -297,7 +297,7 @@ __PACKAGE__->register_method ({
 
        my $realcmd = sub {
            STDOUT->autoflush(1);
-           my $account = $acme_node_config->{account} // 'default';
+           my $account = $acme_node_config->{account};
            my $account_file = "${acme_account_dir}/${account}";
            die "ACME account config file '$account' does not exist.\n"
                if ! -e $account_file;
@@ -361,7 +361,7 @@ __PACKAGE__->register_method ({
 
        my $realcmd = sub {
            STDOUT->autoflush(1);
-           my $account = $acme_node_config->{account} // 'default';
+           my $account = $acme_node_config->{account};
            my $account_file = "${acme_account_dir}/${account}";
            die "ACME account config file '$account' does not exist.\n"
                if ! -e $account_file;
index ae2f916cd5dffb3596f9ec8d63b4c5d00d7e3c21..ec70e7f355b96997166a6783e6f513c10948b682 100644 (file)
@@ -243,7 +243,7 @@ sub get_acme_conf {
            die $@;
        }
     }
-    $res->{0}->{account} = $res->{0}->{account} // "default";
+    $res->{account} = delete $res->{0}->{account} // "default";
     my $domainlist = [];
 
     for my $index (0..$MAXDOMAINS) {