You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Christophe Jelger (Jira)" <ji...@apache.org> on 2020/10/16 08:05:00 UTC

[jira] [Created] (SLING-9834) [Sling Models] Caching bug with reused Servlet requests

Christophe Jelger created SLING-9834:
----------------------------------------

             Summary: [Sling Models] Caching bug with reused Servlet requests
                 Key: SLING-9834
                 URL: https://issues.apache.org/jira/browse/SLING-9834
             Project: Sling
          Issue Type: Bug
          Components: Extensions
    Affects Versions: Sling Models Impl 1.4.14
            Reporter: Christophe Jelger
             Fix For: Sling Models Impl 1.4.16


The fix from https://issues.apache.org/jira/browse/SLING-9781 introduces another unexpected issue because a container like Jetty may reuse ServletRequest objects, so this means that Sling models might be cached across different HTTP requests because of the unwrapping introduced by SLING-9781.

After a quick discussion with [~cziegeler] and [~justin], it is actually best to use the ServletRequest attributes to store the cached models and avoid any unwrapping.

I'll provide a PR with a fix.

cc: [~radu]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)