diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-10-17 16:11:31 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-10-17 16:11:31 +0200 |
commit | dc50e1168020211a4dfd392334a83df74dd3a5d0 (patch) | |
tree | 336a51c13c89631da1ea337ca626076b729b1108 /system/libraries/Input.php | |
parent | 87da39a77bce2660e77565136de0530b757267cb (diff) |
added validation of IP segments to make sure they aren't empty, e.g. 127.0..1
-Derek
Diffstat (limited to 'system/libraries/Input.php')
-rw-r--r-- | system/libraries/Input.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Input.php b/system/libraries/Input.php index f558e91e4..fae188e3c 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -413,7 +413,7 @@ class CI_Input { {
// IP segments must be digits and can not be
// longer than 3 digits or greater then 255
- if (preg_match("/[^0-9]/", $segment) OR $segment > 255 OR strlen($segment) > 3)
+ if ($segment == '' OR preg_match("/[^0-9]/", $segment) OR $segment > 255 OR strlen($segment) > 3)
{
return FALSE;
}
|