Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22426

DetectMobileDevice redirection fails for URI

    Details

      Description

      If you configure MobileSiteAccessURL to use a siteaccess passed trough URI, the redirection will fail and end up with "module not found" error.

      This bug seems to happen because

      // ezpublish_legacy/kernel/private/classes/ezpmobiledeviceregexpfilter.php
      // Line 121
              if ( !isset( $_COOKIE['eZMobileDeviceDetect'] )
                      && !in_array( $currentSiteAccess['name'], eZINI::instance()->variable( 'SiteAccessSettings', 'MobileSiteAccessList'  ) ) )
              {
                  $http->redirect( eZINI::instance()->variable( 'SiteAccessSettings', 'MobileSiteAccessURL' ) . eZSys::serverVariable(  'REQUEST_URI' ) 
      

      eZ Publish will append eZSys::serverVariable( 'REQUEST_URI' ) at the end of MobileSiteAccessURL ignoring if among the REQUEST_URI is the siteaccess.

      Steps to reproduce

      1. Configure site.ini.append.php of override with the following settings

        [SiteSettings]
        DefaultAccess=eng
        

      2. Configure site.ini.append.php of eng siteaccess with the following settings

        [SiteAccessSettings]
        DetectMobileDevice=enabled
        MobileSiteAccessURL=http://your-domain.com/iphone
        

      3. Open http://your-domain.com in your browser (from a mobile device) and confirm that you will end up in the correct mobile address: http://your-domain.com/iphone
      4. Now open your url with a siteaccess, in this case I'll use the default one eng: http://your-domain.com/eng
      5. If the bug is present, you will see the siteaccess uri part following the mobile siteaccess after the redirect: http://your-domain.com/iphone/eng.

        Issue Links

          Activity

          Show
          Yannick Roger (Inactive) added a comment - Example of URL redirection: URL entered URL redirected http://ez4.local http://ez4.local/iphone http://ez4.local/eng http://ez4.local/iphone/ http://ez4.local/blog http://ez4.local/iphone/blog http://ez4.local/eng/blog http://ez4.local/iphone/blog
          Show
          Yannick Roger (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-legacy/commit/d9c6b978351a75b13e10e3eb927ccadb1e625d73
          Hide
          Pedro Resende (Inactive) added a comment -

          Tested and approved by Q.A.

          Show
          Pedro Resende (Inactive) added a comment - Tested and approved by Q.A.

            People

            • Assignee:
              Unassigned
              Reporter:
              Eduardo Fernandes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 30 minutes
                1d 2h 30m