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

Hardcoded anonymous_hash in FosHttpCache mismatches what is generated by Platform

    Details

      Description

      FosHttpCache uses a default, hardcoded user hash for anonymous users to save on performances.

      PR FosHttpCacheBundle#274 added a consistency check on the hash that re-generates the hash using the session in order to prevent inconsistencies with expired / cleared up sessions.

      The hash that gets generated for Platform's anonymous user does not match the hardcoded one. Since it depends on how the anonymous role is configured, it may change on any instance.

      This causes anonymous requests to invalidate cached versions of pages, since the consistency check disables caches / varying.

        Issue Links

          Activity

          Bertrand Dunogier created issue -
          Bertrand Dunogier made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10037 ]
          Bertrand Dunogier made changes -
          Link This issue relates to EZP-25505 [ EZP-25505 ]
          Bertrand Dunogier made changes -
          Priority High [ 3 ] Critical [ 2 ]
          André Rømcke made changes -
          Description FosHttpCache uses a [default, hardcoded user hash|https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/src/SymfonyCache/UserContextSubscriber.php#L64] for anonymous users to save on performances.

          PR [FosHttpCacheBundle#274|https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/pull/274] added a consistency check on the hash that re-generates the hash using the session in order to prevent inconsistencies with expired / cleared up sessions.

          The hash that gets generated for Platform's anonymous user does not match the hardcoded one. Since it depends on how the anonymous role is configured, it may change on any instance.

          This causes anonymous requests to invalidate cached versions of pages, since the consistency check disables caches / varying.
          FosHttpCache uses a [default, hardcoded user hash|https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/src/SymfonyCache/UserContextSubscriber.php#L63] for anonymous users to save on performances.

          PR [FosHttpCacheBundle#274|https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/pull/274] added a consistency check on the hash that re-generates the hash using the session in order to prevent inconsistencies with expired / cleared up sessions.

          The hash that gets generated for Platform's anonymous user does not match the hardcoded one. Since it depends on how the anonymous role is configured, it may change on any instance.

          This causes anonymous requests to invalidate cached versions of pages, since the consistency check disables caches / varying.
          Bertrand Dunogier made changes -
          Status Confirmed [ 10037 ] Backlog [ 10000 ]
          Bertrand Dunogier made changes -
          Status Backlog [ 10000 ] Development [ 3 ]
          Assignee Bertrand Dunogier [ bertrand.dunogier@ez.no ]
          Bertrand Dunogier made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR ezsystems/ezpublish-kernel/pull/1601 (Web Link)" [ 16262 ]
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR FriendsOfSymfony/FOSHttpCacheBundle#289 (Web Link)" [ 16263 ]
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR ezsystems/ezpublish-kernel/pull/1601 (Web Link)" [ 16262 ]
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR ezsystems/ezpublish-kernel#1601 (Web Link)" [ 16264 ]
          André Rømcke made changes -
          Link This issue relates to CS-5465 [ CS-5465 ]
          Joaquim Cavalleri (Inactive) made changes -
          Fix Version/s Customer request [ 11018 ]
          Joaquim Cavalleri (Inactive) made changes -
          Affects Version/s 5.4.6 [ 14493 ]
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR ezsystems/ezpublish-kernel#1601 (Web Link)" [ 16264 ]
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR ezsystems/ezpublish-kernel#1758 (Web Link)" [ 16790 ]
          André Rømcke made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Fix Version/s 5.4.8 [ 14594 ]
          Fix Version/s 1.4.2 [ 14595 ]
          Fix Version/s 1.5.1 [ 14598 ]
          Fix Version/s 1.3.3 [ 14599 ]
          Fix Version/s 1.6.0 [ 14600 ]
          Assignee Bertrand Dunogier [ bertrand.dunogier@ez.no ]
          Rui Silva (Inactive) made changes -
          Status Documentation Review done [ 10011 ] QA [ 10008 ]
          Rui Silva (Inactive) made changes -
          Assignee Rui Silva [ rui.silva@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Joao Inacio (Inactive) made changes -
          Link This issue relates to EZP-26379 [ EZP-26379 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 97972 ] EZEE Development Workflow [ 125568 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Bertrand Dunogier
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: