Destination Param causes Leaked Metadata

Created on 17 September 2024, 3 months ago

Problem/Motivation

I've recently started noticing some "leaked cacheability metadata" in the logs for my sites. I read through some of the documentation and it mentioned ->toString(TRUE) and attaching the cache data to a CacheableRedirectResponse or using Symfony RedirectResponse and not dealing with it at all. I tried both options and was still getting the warning. After removing the Destination and using one of the suggested fixes the issue seems to go away.

Next I tried this with a Standard Drupal Site install with the only extra module being SAML Authentication. I created a page with a login link with a destination back to /node in content (/saml/login?destination=/node) and was still getting the leaked metadata warning. Is there something I need to configure to resolve this issue?

I noticed in the code that when the destination url is generated it doesn't use ->toString(TRUE), but I wasn't sure if the cache data for that was handled elsewhere or just ignored since a custom render context is used.

πŸ’¬ Support request
Status

Active

Version

3.10

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States EJSeguinte

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024