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,9 +233,11 @@ class CreateServer extends CreateRecord
|
||||
$end = min((int) $end, 2 ** 16 - 1);
|
||||
$range = $start <= $end ? range($start, $end) : range($end, $start);
|
||||
foreach ($range as $i) {
|
||||
if($i > 1024 && $i <= 65535) {
|
||||
$ports->push($i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$uniquePorts = $ports->unique()->values();
|
||||
if ($ports->count() > $uniquePorts->count()) {
|
||||
@ -249,8 +251,6 @@ class CreateServer extends CreateRecord
|
||||
$ports = $sortedPorts;
|
||||
}
|
||||
|
||||
$ports = $ports->filter(fn ($port) => $port > 1024 && $port < 65535)->values();
|
||||
|
||||
if ($update) {
|
||||
$set('allocation_ports', $ports->all());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user