mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 15:44:45 +02:00
Limit to valid ports
This commit is contained in:
parent
6f8f5e2746
commit
b4e8f0586a
@ -158,7 +158,7 @@ class CreateServer extends CreateRecord
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not add non numerical ports
|
// Do not add non-numerical ports
|
||||||
$update = true;
|
$update = true;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
@ -189,6 +189,8 @@ class CreateServer extends CreateRecord
|
|||||||
$ports = $sortedPorts;
|
$ports = $sortedPorts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ports = $ports->filter(fn ($port) => $port > 1024 && $port < 65535)->values();
|
||||||
|
|
||||||
if ($update) {
|
if ($update) {
|
||||||
$set('allocation_ports', $ports->all());
|
$set('allocation_ports', $ports->all());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user