all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v3 http-server 1/3] multipart upload: fix upload of files starting with newlines
@ 2022-12-12 15:07 Matthias Heiserer
  2022-12-12 15:07 ` [pve-devel] [PATCH v3 http-server 2/3] fix multipart upload: ignore additional headers Matthias Heiserer
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Matthias Heiserer @ 2022-12-12 15:07 UTC (permalink / raw)
  To: pve-devel

Currently, if a file starts with a newline, it gets removed
and the uploda succeeds (provided no hash is given).

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
---
 src/PVE/APIServer/AnyEvent.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm
index f397a8c..545c122 100644
--- a/src/PVE/APIServer/AnyEvent.pm
+++ b/src/PVE/APIServer/AnyEvent.pm
@@ -1217,7 +1217,7 @@ sub file_upload_multipart {
 	    if ($hdl->{rbuf} =~
 		s/^${delim_re}
 		Content-Disposition:\ (.*?);\ name="(.*?)";\ filename="([^"]+)"${newline_re}
-		Content-Type:\ \S*\s+
+		Content-Type:\ \S*${newline_re}{2}
 		//sxx
 	    ) {
 		assert_form_disposition($1);
-- 
2.30.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-13 12:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12 15:07 [pve-devel] [PATCH v3 http-server 1/3] multipart upload: fix upload of files starting with newlines Matthias Heiserer
2022-12-12 15:07 ` [pve-devel] [PATCH v3 http-server 2/3] fix multipart upload: ignore additional headers Matthias Heiserer
2022-12-12 15:07 ` [pve-devel] [PATCH v3 http-server 3/3] multipart upload: don't require trailing newline Matthias Heiserer
2022-12-12 16:05 ` [pve-devel] [PATCH v3 http-server 1/3] multipart upload: fix upload of files starting with newlines Daniel Tschlatscher
2022-12-13 12:25 ` [pve-devel] applied-series: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal