From: John Hollowell Date: Fri, 18 Nov 2022 01:39:11 +0000 (+0000) Subject: multipart upload: remove ignore-whitespace flag from regex X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=sidebyside;h=0b6b3b372b0d5fde26f87d2bc1bedad3b54ce04a;p=pve-http-server.git multipart upload: remove ignore-whitespace flag from regex makes it rather harder to read and now unnecessary Signed-off-by: John Hollowell [ T: resolve merge conflict and add commit message ] Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index af44e9c..f1e700a 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -1222,9 +1222,7 @@ sub file_upload_multipart { $extract_form_disposition->('checksum-algorithm'); $extract_form_disposition->('checksum'); - if ($hdl->{rbuf} =~ - s/^${delim_re}Content-Disposition:\ (.*?);\ name="(.*?)";\ filename="([^"]+)"${newline_re}//sxx - ) { + if ($hdl->{rbuf} =~ s/^${delim_re}Content-Disposition: (.*?); name="(.*?)"; filename="([^"]+)"${newline_re}//s) { assert_form_disposition($1); die "wrong field name '$2' for file upload, expected 'filename'" if $2 ne "filename"; $rstate->{phase} = 2;