Hi Derek,
Thanks for your response.
You know I am really new to CI so I probably am not the best person to answer:
Will this patch break anything else?
As far as the other questions I will try to provided what I can to answer them to the best of my knowledge:
SHORT DESCRIPTION OF BUG
This bug is happening whenever the installation of CI is in a sub folder and not installed in the root directory. The problem occurs in the Router.php file (system/libraries/Router.php). It is comparing the wrong strings.
FILES AFFECTED WITH PATCH
You can download the zip file here, it only contains the files effected.
ci/index.php
ci/system/libraries/Router.php
WHY IS THIS A BUG
It tries to compare the constant SELF to various $_SERVER variables (PATH_INFO and ORG_PATH_INFO) in the _get_uri_string() starting around line 288 of Router.php. SELF is constant to compare against due to the subdirectory installation. What is need to compare is the full path from the public root to self.
PROOF OF CONCEPT CODE
I have unpacked CI 1.5.2 and uploaded it to /bug. I have an install directory of:
/bug
/bug/index.php
/bug/system
Everything else in the system folder is default.
If you go to the following address they all should load the welcome controller
http://www.jepamedia.com/bug <<<<<CI 404
http://www.jepamedia.com/bug/ <<<<<CI 404
http://www.jepamedia.com/bug/index.php <<<<<CI 404
http://www.jepamedia.com/bug/index.php/ <<<<<Success
http://www.jepamedia.com/bug/index.php/welcome <<<<<Success
http://www.jepamedia.com/bug/index.php/welcome/index <<<<<Success
PROOF OF CONCEPT PATCH
I have unpacked CI 1.5.2 and uploaded it to /patched. I have an install directory of:
/patched
/patched/index.php
/patched/system
Everything else in the system folder is default.
If you go to the following address they all should load the welcome controller
http://www.jepamedia.com/patched <<<<<Success
http://www.jepamedia.com/patched/ <<<<<Success
http://www.jepamedia.com/patched/index.php <<<<<Success
http://www.jepamedia.com/patched/index.php/ <<<<<Success
http://www.jepamedia.com/patched/index.php/welcome <<<<<Success
http://www.jepamedia.com/patched/index.php/welcome/index <<<<<Success
PATCHED CODE
Get it here.
Derek please let me know if you need anything else.
Regards,
Mediaslave