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

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.7.0 Sprint 2 [ 87 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        Automated transition triggered when Jonathan Reissmueller created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        Automated transition triggered when Jonathan Reissmueller created pull request #705 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 25 minutes [ 1500 ]
        Worklog Id 12417 [ 12417 ]
        tyson Tyson Phillips (Inactive) made changes -
        Fix Version/s 4.6.1 [ 11124 ]
        tyson Tyson Phillips (Inactive) made changes -
        Fix Version/s 4.7.0-b1 [ 11123 ]
        Fix Version/s 4.6.1 [ 11124 ]
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #705 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          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