From 2615e418539c3d6e2f912c66be99ffebfb8513ff Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 6 Oct 2010 17:51:16 -0500 Subject: fixed a security issue which in certain cases could result in directory traversal --- system/core/Router.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/core/Router.php') diff --git a/system/core/Router.php b/system/core/Router.php index b371d5241..d911eb224 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -345,7 +345,7 @@ class CI_Router { */ function set_class($class) { - $this->class = $class; + $this->class = str_replace(array('/', '.'), '', $class); } // -------------------------------------------------------------------- @@ -404,7 +404,7 @@ class CI_Router { */ function set_directory($dir) { - $this->directory = trim($dir, '/').'/'; + $this->directory = str_replace(array('/', '.'), '', $dir).'/'; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b