mirror of
https://git.proxmox.com/git/pve-http-server
synced 2025-07-05 17:40:10 +00:00
multipart upload: fix upload of files starting with newlines
Currently, if a file starts with a newline, it gets removed and the upload succeeds (provided no hash is given). Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com> Reviewed-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com> Tested-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
This commit is contained in:
parent
7a6657f0d1
commit
26ea294acd
@ -1217,7 +1217,7 @@ sub file_upload_multipart {
|
|||||||
if ($hdl->{rbuf} =~
|
if ($hdl->{rbuf} =~
|
||||||
s/^${delim_re}
|
s/^${delim_re}
|
||||||
Content-Disposition:\ (.*?);\ name="(.*?)";\ filename="([^"]+)"${newline_re}
|
Content-Disposition:\ (.*?);\ name="(.*?)";\ filename="([^"]+)"${newline_re}
|
||||||
Content-Type:\ \S*\s+
|
Content-Type:\ \S*${newline_re}{2}
|
||||||
//sxx
|
//sxx
|
||||||
) {
|
) {
|
||||||
assert_form_disposition($1);
|
assert_form_disposition($1);
|
||||||
|
Loading…
Reference in New Issue
Block a user