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

FOSHttpCache always matches default site with urielement matcher

    XMLWordPrintable

Details

    Description

      Summary:

      If using urielement matcher the site is matched against '/_fos_user_context_hash' while generating the X-User-Hash causing default site access to be used during both getting the user hash and the original request.

      Long description

      After logging in a redirect occurs and the following happens:
      1. The page is loaded from the cache via \FOS\HttpCacheBundle\HttpCache::handle
      2. The user hash header is not present yet so \FOS\HttpCacheBundle\HttpCache::handle::getUserHash is called to get it
      3. A forward request is made doing and a siteaccess match is performed during the process and stored in the router. If you are using an urlelement matcher, it is matched against '/_fos_user_context_hash'. Since this is not a valid siteaccess the default site access is used.
      4. The user hash is returned and the user hash header is updated
      5. The original request is now handled and since a site access match was made during step 3, the default siteaccess is used instead of the expected urielement matcher

      Attachments

        Activity

          People

            Unassigned Unassigned
            feb52ca2-9206-4fa9-818f-2c4dcf3f42b0@accounts.ibexa.co Douglas Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: