mirror of
https://git.proxmox.com/git/pve-http-server
synced 2025-07-05 17:40:10 +00:00
explicitly disallow tmpfilename parameter in query URL
This is an internal parameter and we pass the actual internal one around via the $reqstate variable, so avoid confusion and return a clear error if a POST request sets this query parameter. Reported-by: Friedrich Weber <f.weber@proxmox.com> Suggested-by: Friedrich Weber <f.weber@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
a2a3d17be8
commit
cb53bd6861
@ -1571,6 +1571,10 @@ sub authenticate_and_handle_request {
|
|||||||
starttime => [gettimeofday],
|
starttime => [gettimeofday],
|
||||||
outfh => $outfh,
|
outfh => $outfh,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
die "'tmpfilename' query parameter is not allowed for file uploads\n"
|
||||||
|
if exists $state->{params}->{tmpfilename};
|
||||||
|
|
||||||
$reqstate->{tmpfilename} = $tmpfilename;
|
$reqstate->{tmpfilename} = $tmpfilename;
|
||||||
$reqstate->{hdl}->on_read(sub {
|
$reqstate->{hdl}->on_read(sub {
|
||||||
$self->file_upload_multipart($reqstate, $auth, $method, $path, $state);
|
$self->file_upload_multipart($reqstate, $auth, $method, $path, $state);
|
||||||
|
Loading…
Reference in New Issue
Block a user