mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 07:34:45 +02:00
Fix #452
Prob not the best solution, but it works Closes: https://github.com/pelican-dev/panel/issues/452
This commit is contained in:
parent
c464b321dd
commit
40721a2cb8
@ -233,7 +233,9 @@ class CreateServer extends CreateRecord
|
|||||||
$end = min((int) $end, 2 ** 16 - 1);
|
$end = min((int) $end, 2 ** 16 - 1);
|
||||||
$range = $start <= $end ? range($start, $end) : range($end, $start);
|
$range = $start <= $end ? range($start, $end) : range($end, $start);
|
||||||
foreach ($range as $i) {
|
foreach ($range as $i) {
|
||||||
$ports->push($i);
|
if($i > 1024 && $i <= 65535) {
|
||||||
|
$ports->push($i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,8 +251,6 @@ 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