diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-12-23 21:19:34 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-12-23 21:19:54 +0000 |
commit | d9e258bb1df4c8a0d720c818ad433f8e9f6c3824 (patch) | |
tree | da4cf13294b369e67ffa0c4d270304fa86c9652b /etc/inc/util.inc | |
parent | a3e027f60995f327ec7a795fbc01423147eeaa51 (diff) | |
download | pfsense-d9e258bb1df4c8a0d720c818ad433f8e9f6c3824.zip pfsense-d9e258bb1df4c8a0d720c818ad433f8e9f6c3824.tar.gz |
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.
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r-- | etc/inc/util.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 92bb23f..6727f94 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -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 |