[pve-devel] applied: [PATCH qemu-server] fix #3683: agent file-write: enable user to encode the content themselves

Dominik Csapak d.csapak at proxmox.com
Fri Feb 11 08:20:08 CET 2022


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 at 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





More information about the pve-devel mailing list