Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-16862

Flawed implementations of ResourceResolverChain and ResourceTransformerChain

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 5.0.6
    • Fix Version/s: 5.0.7, 5.1 RC1
    • Component/s: Reactive, Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      The ResourceResolverChain and ResourceTransformerChain implementations in WebFlux use a List with a mutable index. This works as expected as long as resolvers and transformers use the chain instance when first called. However, if they use the chain from a nested, potentially asynchronous call that executes later, the chain index would almost certainly have a different value. 

      Looking at the implementations, those that make a nested call, and are impacted, include VersionResourceResolver, WebJarsResourceResolver, CssLinkResourceTransformer and AppCacheManifestTransformer.

      Unfortunately the issue went undetected by any tests since in many cases delegating to the chain from any point might still produce the right end results, with the PathResourceResolver at the end.

       

        Attachments

          Activity

            People

            • Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              rstoya05-aop Rossen Stoyanchev
              Last updater:
              Stéphane Nicoll
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 weeks, 2 days ago