mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
If the port passed as argument is a range(having - in it) this function would still return true as a bad habit of intval. Fix this so it behaves correctly.
This commit is contained in:
parent
a3e027f609
commit
d9e258bb1d
@ -302,6 +302,8 @@ function is_validaliasname($name) {
|
||||
function is_port($port) {
|
||||
if (getservbyname($port, "tcp") || getservbyname($port, "udp"))
|
||||
return true;
|
||||
if (!ctype_digit($port))
|
||||
return false;
|
||||
if ((intval($port) < 1) || (intval($port) > 65535))
|
||||
return false;
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user