[pve-devel] [PATCH v2 http-server 2/2] Remove whitespace ignore from regex

John Hollowell jhollowe at johnhollowell.com
Fri Nov 18 02:39:11 CET 2022


Signed-off-by: John Hollowell <jhollowe at johnhollowell.com>
---
 src/PVE/APIServer/AnyEvent.pm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm
index d958642..ed1321d 100644
--- a/src/PVE/APIServer/AnyEvent.pm
+++ b/src/PVE/APIServer/AnyEvent.pm
@@ -1214,9 +1214,7 @@ sub file_upload_multipart {
 	    $extract_form_disposition->('checksum-algorithm');
 	    $extract_form_disposition->('checksum');

-	    if ($hdl->{rbuf} =~
-		s/^${delim_re}Content-Disposition:\ (.*?);\ name="(.*?)";\ filename="([^"]+)"//sxx
-	    ) {
+	    if ($hdl->{rbuf} =~ s/^${delim_re}Content-Disposition: (.*?); name="(.*?)"; filename="([^"]+)"//s) {
 		assert_form_disposition($1);
 		die "wrong field name '$2' for file upload, expected 'filename'" if $2 ne "filename";
 		$rstate->{phase} = 2;
--
2.30.2




More information about the pve-devel mailing list