From 5545dcdc170eca21c3d2c91e10556698f9512643 Mon Sep 17 00:00:00 2001 From: medhavini Date: Thu, 23 Jul 2015 18:59:44 +0530 Subject: IP Address checking generates false positives. IP Address checking marks all IPs between 0.0.0.0 - 999.999.999.999 as valid IP Address. Which is not true. --- system/helpers/path_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index 019e220f3..cf6be776f 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -61,7 +61,7 @@ if ( ! function_exists('set_realpath')) function set_realpath($path, $check_existance = FALSE) { // Security check to make sure the path is NOT a URL. No remote file inclusion! - if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})#i', $path) || ( function_exists('fsockopen') && @fsockopen($path, 80, $errno, $errstr, 30))) + if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp)#i', $path)) { show_error('The path you submitted must be a local server path, not a URL'); } -- cgit v1.2.3-24-g4f1b