Welcome Guest, Not a member yet? Register   Sign In
_fetch_uri_string
#1

[eluser]Pascal Kriete[/eluser]
When I call the ci directory directly, such as (in this case with mod_rewrite):
Quote:http://localhost/testpage/

My server returns '/' for the $_SERVER['PATH_INFO']:
Code:
$path = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');            
if ($path != '' AND $path != "/".SELF)
{
    $this->uri_string = $path;
    return;
}
Now when _explode_segments is called on the uri_string, it passes an empty string to the _filter_uri function.

An empty string fails the regular expression in said function and thus returns a "URI has disallowed characters" error.

Idea for a Fix:
Add:
Code:
AND $path != "/"
to the _fetch_uri_string function above, or check for emtpy strings before evaluating the regular expression.
#2

[eluser]bardelot[/eluser]
The "ORIG_PATH_INFO" behaviour needs to be changed as well.
Code:
$path = (isset($_SERVER['ORIG_PATH_INFO'])) ? $_SERVER['ORIG_PATH_INFO'] : @getenv('ORIG_PATH_INFO');    
   if ($path != '' AND $path != "/".SELF AND $path != "/")

I realised that if "uri_protocol" is not set to AUTO the "/" gets killed.
Code:
// If the URI contains only a slash we'll kill it
   if ($this->uri_string == '/')
   {
      $this->uri_string = '';
   }




Theme © iAndrew 2016 - Forum software by © MyBB