summaryrefslogtreecommitdiffstats
path: root/system/libraries/Router.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-08-27 21:32:02 +0200
committeradmin <devnull@localhost>2006-08-27 21:32:02 +0200
commit1082bddc0c065895a3b39607cb930f5a101f54fb (patch)
tree2c19cb7dcee82642f2a072bf9f432091fda4c8b1 /system/libraries/Router.php
parent0d29605b1e774efd57ffd8f5ccc8eaec1e9ca576 (diff)
Diffstat (limited to 'system/libraries/Router.php')
-rw-r--r--system/libraries/Router.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/system/libraries/Router.php b/system/libraries/Router.php
index b28ead953..2219f5739 100644
--- a/system/libraries/Router.php
+++ b/system/libraries/Router.php
@@ -254,12 +254,14 @@ class CI_Router {
*/
function _filter_uri($str)
{
- if ( ! preg_match("/^[a-z0-9~\s\%\.:_-]+$/i", $str))
- {
- exit('The URI you submitted has disallowed characters: '.$str);
- }
-
- return $str;
+ if ($this->config->item('permitted_uri_chars') != '')
+ {
+ if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
+ {
+ exit('The URI you submitted has disallowed characters: '.$str);
+ }
+ }
+ return $str;
}
// END _filter_uri()