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 4D3711FF179 for ; Wed, 15 Oct 2025 13:17:56 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 67B2619387; Wed, 15 Oct 2025 13:18:13 +0200 (CEST) From: Nicolas Frey To: pve-devel@lists.proxmox.com Date: Wed, 15 Oct 2025 13:17:40 +0200 Message-ID: <20251015111740.122773-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.977 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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 pve-manager v2] 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. Signed-off-by: Nicolas Frey --- PVE/API2/ACMEPlugin.pm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/PVE/API2/ACMEPlugin.pm b/PVE/API2/ACMEPlugin.pm index c12b75c5..2f210903 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_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_return_schema->{properties}->{id}; __PACKAGE__->register_method({ name => 'index', @@ -74,7 +84,7 @@ __PACKAGE__->register_method({ }, returns => { type => 'array', - items => $acme_challenge_api_create_and_return_schema, + items => $acme_challenge_return_schema, links => [{ rel => 'child', href => "{plugin}" }], }, code => sub { @@ -108,7 +118,7 @@ __PACKAGE__->register_method({ id => get_standard_option('pve-acme-pluginid'), }, }, - returns => $acme_challenge_api_create_and_return_schema, + returns => $acme_challenge_return_schema, code => sub { my ($param) = @_; @@ -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