]> git.proxmox.com Git - pve-http-server.git/commitdiff
increase allowed spiceport range
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 3 Mar 2020 09:47:31 +0000 (10:47 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 6 Mar 2020 17:58:45 +0000 (18:58 +0100)
by using the new spice_port_range sub from PVE::Tools

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/APIServer/AnyEvent.pm

index 3ce948ff1889a9f9746490e99a7cfbf056cc1d96..664afbdcfaba9f423166e85091353e32532b2712 100644 (file)
@@ -808,7 +808,8 @@ sub handle_spice_proxy_request {
 
     eval {
 
-        die "Port $spiceport is not allowed" if ($spiceport < 61000 || $spiceport > 61099);
+       my ($minport, $maxport) = PVE::Tools::spice_port_range();
+        die "Port $spiceport is not allowed" if ($spiceport < $minport || $spiceport > $maxport);
 
        my $clientip = $reqstate->{peer_host};
        my $r = $reqstate->{request};