Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.7.0-b1
-
Component/s: None
-
Labels:None
Description
In the /config/routes.php file, you can define the Route.admin and Route.client values for the admin and client interfaces, respectively. However, these routes appear to be used to check "if this value exists in the URI". This means if the Route.admin is "a", then any URI with an "a" in it will be assigned the admin URI, and so a location like "/client/accounts/" is routed through the admin UI since it contains an "a". Instead, it should check "if the URI begins with the route".
Route.client | Route.admin | Example URI | Actual Base URI | Expected Base URI |
---|---|---|---|---|
client | admin | /client/main/admin/ | admin URI | client URI |
client | a | /client/accounts/ | admin URI | client URI |
Look at updating app_controller's base_uri assignment, for example, by updating the base URI checks:
if (strpos($filtered_uri, Configure::get('Route.admin')) !== false) {
to
if (strpos($filtered_uri, Configure::get('Route.admin')) === 0) {