diff --git a/app/Services/Allocations/AssignmentService.php b/app/Services/Allocations/AssignmentService.php index 3788d6bf89..3fd0dc27cb 100644 --- a/app/Services/Allocations/AssignmentService.php +++ b/app/Services/Allocations/AssignmentService.php @@ -14,7 +14,7 @@ class AssignmentService { - public const CIDR_MAX_BITS = 27; + public const CIDR_MAX_BITS = 25; public const CIDR_MIN_BITS = 32; public const PORT_FLOOR = 1024; public const PORT_CEIL = 65535; @@ -74,7 +74,7 @@ public function handle(Node $node, array $data): array throw new TooManyPortsInRangeException(); } - if ((int) $matches[1] <= self::PORT_FLOOR || (int) $matches[2] > self::PORT_CEIL) { + if ((int) $matches[1] < self::PORT_FLOOR || (int) $matches[2] > self::PORT_CEIL) { throw new PortOutOfRangeException(); } @@ -88,7 +88,7 @@ public function handle(Node $node, array $data): array ]; } } else { - if ((int) $port <= self::PORT_FLOOR || (int) $port > self::PORT_CEIL) { + if ((int) $port < self::PORT_FLOOR || (int) $port > self::PORT_CEIL) { throw new PortOutOfRangeException(); } diff --git a/lang/en/exceptions.php b/lang/en/exceptions.php index 3c9adf4c90..9ec18f9b27 100644 --- a/lang/en/exceptions.php +++ b/lang/en/exceptions.php @@ -11,7 +11,7 @@ 'too_many_ports' => 'Adding more than 1000 ports in a single range at once is not supported.', 'invalid_mapping' => 'The mapping provided for :port was invalid and could not be processed.', 'cidr_out_of_range' => 'CIDR notation only allows masks between /25 and /32.', - 'port_out_of_range' => 'Ports in an allocation must be greater than 1024 and less than or equal to 65535.', + 'port_out_of_range' => 'Ports in an allocation must be greater than or equal to 1024 and less than or equal to 65535.', ], 'egg' => [ 'delete_has_servers' => 'An Egg with active servers attached to it cannot be deleted from the Panel.',