summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/IPv6.inc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-03-25 10:51:32 +0545
committerPhil Davis <phil.davis@inf.org>2016-03-25 10:51:32 +0545
commit66d78ebc8dd3056a507a4ac82f9f57432fb241b4 (patch)
tree75317bbe5fcb19c8b6ee56a2071d7b049d399221 /src/etc/inc/IPv6.inc
parent4bf6e70f02597eae65c59c9d6ac5cf0f490a242b (diff)
downloadpfsense-66d78ebc8dd3056a507a4ac82f9f57432fb241b4.zip
pfsense-66d78ebc8dd3056a507a4ac82f9f57432fb241b4.tar.gz
Do not allow empty elements in IPv6 addresses
Redmine #6024 Upstream pull request https://github.com/pear/Net_IPv6/pull/14 At this point in the checkIPv6 processing the string should be an uncompressed IPv6 addressed - all the elements should have something in them, a "0" if that element is zero. So any zero-length element is a problem.
Diffstat (limited to 'src/etc/inc/IPv6.inc')
-rw-r--r--src/etc/inc/IPv6.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/inc/IPv6.inc b/src/etc/inc/IPv6.inc
index 4493273..7dbf45a 100644
--- a/src/etc/inc/IPv6.inc
+++ b/src/etc/inc/IPv6.inc
@@ -901,7 +901,7 @@ class Net_IPv6
for ($i = 0; $i < count($ipv6); $i++) {
- if(4 < strlen($ipv6[$i])) {
+ if ((4 < strlen($ipv6[$i])) || (0 == strlen($ipv6[$i]))) {
return false;
OpenPOWER on IntegriCloud