Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-3221

UI defined routes may conflict and change base_uri interface reference

    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) {

        Activity

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Sep/19

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 25 minutes
              25m

                Agile