Changeset 3048
- Timestamp:
- 07/11/2008 07:26:30 AM (5 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Router.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Router.php
r3014 r3048 68 68 69 69 // At this point segments, rsegments, and current URI are all the same 70 self::$segments = self::$rsegments = self::$current_uri = trim(self::$current_uri, '/'); 70 // We trim off periods, slashes, and spaces to prevent malicious attacks 71 // using ../../ URIs. 72 self::$segments = self::$rsegments = self::$current_uri = trim(self::$current_uri, './ '); 73 74 echo Kohana::debug(self::$segments);exit; 71 75 72 76 // Set the complete URI … … 89 93 $method_segment = NULL; 90 94 95 // Paths to search 96 $paths = Config::include_paths(); 97 91 98 foreach (self::$rsegments as $key => $segment) 92 99 { … … 94 101 $controller_path .= $segment; 95 102 103 echo Kohana::debug($segment); 104 96 105 $found = FALSE; 97 $paths = Config::include_paths();98 99 106 foreach ($paths as $dir) 100 107 { … … 149 156 } 150 157 158 exit; 151 159 // Last chance to set routing before a 404 is triggered 152 160 Event::run('system.post_routing');
