summaryrefslogtreecommitdiffstats
path: root/system/helpers/path_helper.php
diff options
context:
space:
mode:
authormedhavini <medhajpr@gmail.com>2015-07-23 15:29:44 +0200
committermedhavini <medhajpr@gmail.com>2015-07-23 15:29:44 +0200
commit5545dcdc170eca21c3d2c91e10556698f9512643 (patch)
tree3a4f64a17f1f179e3510b723a25450ee01ebe210 /system/helpers/path_helper.php
parent78e1b70e35b45455728e4126ed1b19d6332ad26b (diff)
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.
Diffstat (limited to 'system/helpers/path_helper.php')
-rw-r--r--system/helpers/path_helper.php2
1 files changed, 1 insertions, 1 deletions
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');
}