Limit to valid ports

This commit is contained in:
Lance Pioch 2024-05-11 21:48:46 -04:00
parent 6f8f5e2746
commit b4e8f0586a

View File

@ -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());
} }