mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
firewall: off-by-one in regex for target port range parse
PR: https://forum.opnsense.org/index.php?topic=30652.0
This commit is contained in:
parent
8d50193182
commit
edd0d25423
@ -489,7 +489,7 @@ $( document ).ready(function() {
|
||||
<?php
|
||||
$localport = $natent['local-port'];
|
||||
if (strpos($natent['destination']['port'],'-') !== false) {
|
||||
$natlocalport = preg_match('/^(\d){1,4}$/', $natent['local-port']) ? (int)$natent['local-port'] : 1;
|
||||
$natlocalport = preg_match('/^(\d){1,5}$/', $natent['local-port']) ? (int)$natent['local-port'] : 1;
|
||||
list($dstbeginport, $dstendport) = explode("-", $natent['destination']['port']);
|
||||
$dstbeginport = preg_match('/^\d*$/', $dstbeginport) ? (int)$dstbeginport : 1;
|
||||
$dstendport = preg_match('/^\d*$/', $dstendport) ? (int)$dstendport : 65535;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user