From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id D6D2B1FF179 for ; Wed, 15 Oct 2025 12:05:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8139D17AF0; Wed, 15 Oct 2025 12:05:57 +0200 (CEST) From: Nicolas Frey To: pve-devel@lists.proxmox.com Date: Wed, 15 Oct 2025 12:05:23 +0200 Message-ID: <20251015100523.101651-1-n.frey@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 1 AWL -0.997 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_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods KAM_MAILER 2 Automated Mailer Tag Left in Email RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [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" 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", }, -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel