From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 512B61FF179 for ; Wed, 15 Oct 2025 13:22:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C6A8719535; Wed, 15 Oct 2025 13:22:29 +0200 (CEST) Message-ID: <812345c5-a062-427d-b1e3-225e4bf63e08@proxmox.com> Date: Wed, 15 Oct 2025 13:22:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: pve-devel@lists.proxmox.com References: <20251015100523.101651-1-n.frey@proxmox.com> Content-Language: en-US From: Nicolas Frey In-Reply-To: <20251015100523.101651-1-n.frey@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1760527344101 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.060 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_MAILER 2 Automated Mailer Tag Left in Email SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH] fix #6932: api: acme: add digest and plugin to return schema X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Renamed $acme_challenge_api_create_and_return_schema in v2 Superseded-by: https://lore.proxmox.com/pve-devel/20251015111740.122773-1-n.frey@proxmox.com/T/#u On 10/15/25 12:04 PM, Nicolas Frey wrote: > fixes regression from `427e2627 api: add ACME plugin return schema` > by adding digest and plugin parameters and deleting id parameter, as > it is replaced by plugin on return schemas. This mismatch would > result in `400 Result verification failed` on index and > get_plugin_config. > > Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=6932 > Signed-off-by: Nicolas Frey > --- > PVE/API2/ACMEPlugin.pm | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/PVE/API2/ACMEPlugin.pm b/PVE/API2/ACMEPlugin.pm > index c12b75c5..1754d9f0 100644 > --- a/PVE/API2/ACMEPlugin.pm > +++ b/PVE/API2/ACMEPlugin.pm > @@ -50,7 +50,17 @@ my $modify_cfg_for_api = sub { > return $plugin_cfg; > }; > > -my $acme_challenge_api_create_and_return_schema = PVE::ACME::Challenge->createSchema(); > +my $acme_challenge_create_schema = PVE::ACME::Challenge->createSchema(); > +my $acme_challenge_api_create_and_return_schema = { > + type => "object", > + properties => { > + PVE::ACME::Challenge->createSchema()->{properties}->%*, > + digest => get_standard_option('pve-config-digest'), > + plugin => get_standard_option('pve-acme-pluginid'), > + }, > +}; > +# replaced by plugin property > +delete $acme_challenge_api_create_and_return_schema->{properties}->{id}; > > __PACKAGE__->register_method({ > name => 'index', > @@ -126,7 +136,7 @@ __PACKAGE__->register_method({ > check => ['perm', '/', ['Sys.Modify']], > }, > protected => 1, > - parameters => $acme_challenge_api_create_and_return_schema, > + parameters => $acme_challenge_create_schema, > returns => { > type => "null", > }, _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel