From dc50e1168020211a4dfd392334a83df74dd3a5d0 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 17 Oct 2008 14:11:31 +0000 Subject: added validation of IP segments to make sure they aren't empty, e.g. 127.0..1 -Derek --- system/libraries/Input.php | 2 +- user_guide/changelog.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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; } diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 1d361913c..4f05cf27a 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -141,6 +141,7 @@ SVN Revision: XXXX

  • Fixed DB_driver bug (4900), in which a database error was not being logged correctly.
  • Fixed DB backup bug in which field names were not being escaped.
  • Fixed a spelling error in a Loader error message.
  • +
  • Fixed a bug (5050) with IP validation with empty segments.
  • Version 1.6.3

    -- cgit v1.2.3-24-g4f1b