[pve-devel] [PATCH common] fix #3747: download_file_from_url: trim whitespace before comparing checksum

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Dec 3 11:11:20 CET 2021


On 03.12.21 09:03, Fabian Ebner wrote:
> Am 02.12.21 um 14:38 schrieb Oguz Bektas:
>> so that we don't get checksum mismatch in case the user accidentally
>> copies whitespace in the checksum field.
>>
> 
> Isn't this better done in the UI? Or at least upon parameter validation (but we don't do this for any other parameter, or)?.
> 

Yeah, I do not like messing with the checksum in the backend to much,
maybe we can enforce the format such that it doesn't allow any whitespace
and explicitly errors out for api users that send some.

I trimmed for now in the frontend:

https://git.proxmox.com/?p=pve-manager.git;a=commitdiff;h=9e9a3abd0a5eedc76a41f6ebcd719dca72d536b8





More information about the pve-devel mailing list