From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <d.csapak@proxmox.com>
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 <pve-devel@lists.proxmox.com>; 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 <pve-devel@lists.proxmox.com>; 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 <pve-devel@lists.proxmox.com>; 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: <d3ba0896-8e10-4fe5-54a3-349fc623cf8d@proxmox.com>
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 <t.lamprecht@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20220210145210.1254509-1-d.csapak@proxmox.com>
 <a4da632c-3915-364e-bcbc-4cef68d96824@proxmox.com>
From: Dominik Csapak <d.csapak@proxmox.com>
In-Reply-To: <a4da632c-3915-364e-bcbc-4cef68d96824@proxmox.com>
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 <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=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 <d.csapak@proxmox.com>
>> ---
>>   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