]> git.proxmox.com Git - pve-http-server.git/commit
upload: re-allow white space in filenames
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 7 Nov 2022 15:07:49 +0000 (16:07 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 7 Nov 2022 15:40:15 +0000 (16:40 +0100)
commita66b77d850662bb8169feb3c8945cc2c09680db7
tree9b94b28b1a38112ee400c31b632242cf406584e7
parentc6702003c5bb68b153ed196257fad90ee8147dae
upload: re-allow white space in filenames

Some fields (e.g. filename) can contain spaces, but our 'trim'
function, would only return the value until the first whitespace
character instead of removing leading/trailing white space. This lead
to passing the wrong filename to the API call (e.g. 'foo' instead of
'foo (1).iso'), which would then reject it because of the 'wrong'
extension.

Fix this by just using the battle proven trim from pve-common.

Fixes: 0fbcbc2 ("fix #3990: multipart upload: rework to fix uploading small files")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/APIServer/AnyEvent.pm