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 630A862077 for ; Fri, 11 Feb 2022 08:20:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 522152506A for ; Fri, 11 Feb 2022 08:20:14 +0100 (CET) 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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4F6F72505E for ; Fri, 11 Feb 2022 08:20:09 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 20674447E8; Fri, 11 Feb 2022 08:20:09 +0100 (CET) Message-ID: Date: Fri, 11 Feb 2022 08:20:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0 Content-Language: en-US To: Thomas Lamprecht , Proxmox VE development discussion References: <20220210145210.1254509-1-d.csapak@proxmox.com> From: Dominik Csapak In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.159 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) 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: Re: [pve-devel] applied: [PATCH qemu-server] fix #3683: agent file-write: enable user to encode the content themselves 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, 11 Feb 2022 07:20:44 -0000 On 2/10/22 16:31, Thomas Lamprecht wrote: > On 10.02.22 15:52, Dominik Csapak wrote: >> by adding an optional parameter 'encode' (enabled by default). When it >> is disabled, the content must be base64 encoded already. This >> way, users can send a binary file to the vm by base64 encoding it >> themselves >> >> Signed-off-by: Dominik Csapak >> --- >> PVE/API2/Qemu/Agent.pm | 20 ++++++++++++++++++-- >> 1 file changed, 18 insertions(+), 2 deletions(-) >> >> > > applied, with some cleanups in general as followup and another one dropping > the base64 check with the assumption that it can be relatively expensive, the > user needs to turn off auto-encode explicitly already and QEMU/QGA should be > able to cope with bogus input - or do you know a case when this isn't true? > As then we can just revert it again. > > thanks! no, i just did it to safeguard in the api instead, but checking again they return "Base64 data contains invalid characters" for bogus data anyway so that's better thanks