From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 1A562A1C64 for ; Fri, 16 Jun 2023 11:28:14 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E9005304AD for ; Fri, 16 Jun 2023 11:27:43 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 16 Jun 2023 11:27:43 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 402E645BA1 for ; Fri, 16 Jun 2023 11:27:43 +0200 (CEST) Date: Fri, 16 Jun 2023 11:27:42 +0200 From: Wolfgang Bumiller To: Dominik Csapak Cc: pve-devel@lists.proxmox.com Message-ID: References: <20230614084622.1446211-1-d.csapak@proxmox.com> <20230614084622.1446211-8-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230614084622.1446211-8-d.csapak@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.125 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] applied: [PATCH manager v6 01/15] pvesh: fix parameters for proxyto_callback 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: , X-List-Received-Date: Fri, 16 Jun 2023 09:28:14 -0000 applied this one On Wed, Jun 14, 2023 at 10:46:07AM +0200, Dominik Csapak wrote: > in pve-http-server the proxyto_callback always has a complete list of > parameters, not only the ones in the url, so adapt the implementation > here to do the same > > Signed-off-by: Dominik Csapak > --- > PVE/CLI/pvesh.pm | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/PVE/CLI/pvesh.pm b/PVE/CLI/pvesh.pm > index 9acf292a..28e2518d 100755 > --- a/PVE/CLI/pvesh.pm > +++ b/PVE/CLI/pvesh.pm > @@ -82,13 +82,15 @@ my $method_map = { > }; > > sub check_proxyto { > - my ($info, $uri_param) = @_; > + my ($info, $uri_param, $params) = @_; > > my $rpcenv = PVE::RPCEnvironment->get(); > > + my $all_params = { %$uri_param, %$params }; > + > if ($info->{proxyto} || $info->{proxyto_callback}) { > my $node = PVE::API2Tools::resolve_proxyto( > - $rpcenv, $info->{proxyto_callback}, $info->{proxyto}, $uri_param); > + $rpcenv, $info->{proxyto_callback}, $info->{proxyto}, $all_params); > > if ($node ne 'localhost' && ($node ne PVE::INotify::nodename())) { > die "proxy loop detected - aborting\n" if $disable_proxy; > @@ -301,7 +303,7 @@ sub call_api_method { > } > > my $data; > - my ($node, $remip) = check_proxyto($info, $uri_param); > + my ($node, $remip) = check_proxyto($info, $uri_param, $param); > if ($node) { > $data = proxy_handler($node, $remip, $path, $cmd, $param); > } else { > @@ -345,7 +347,7 @@ __PACKAGE__->register_method ({ > > my $res; > > - my ($node, $remip) = check_proxyto($info, $uri_param); > + my ($node, $remip) = check_proxyto($info, $uri_param, $param); > if ($node) { > $res = proxy_handler($node, $remip, $path, 'ls', $param); > } else { > -- > 2.30.2