Environment:
- Drupal 10.5.6
- SAML Authentication (samlauth) 8.x-3.11
- Login Destination (login_destination) 8.x-2.0-beta10
- Login destination configured by role to a page

Observed problem:
In Recent Log Messages, there is a samlauth module warning:

While processing SAML authentication response, code leaked cacheability metadata. This indicates a bug somewhere (but it is hard to pinpoint where): if the same code is called in other scenarios too, it may cause fatal crashes, or bloat the render cache unnecessarily. Please investigate. Metadata: i:6;:O:37:"Drupal\Core\Render\BubbleableMetadata":4:{s:16:"*cacheContexts";a:0:{}s:12:"*cacheTags";a:0:{}s:14:"*cacheMaxAge";i:-1;s:14:"*attachments";a:0:{}}

Details of the problem:
From https://www.drupal.org/project/samlauth/issues/3232577, the problem isn't with the samlauth module but the samlauth is detecting a leak. To isolate the issue, all I did was toggle the enable/disable of my login destination config item on /admin/config/people/login-destination. When is was disabled, the warning did not occur. When it was enabled, the warning did occur.

Recommended solution:
I will be uploading a patch which removes the error, but I don't think it's a complete solution. Using the model of patches 1 and 2 in the Rules module, https://www.drupal.org/comment/13953218#comment-13953218, I'm modifying the URL->toString. I didn't deal with the CacheableMetadata aspect, like they did in the Rules, because I wasn't confident in my skills there.

Comments

karenann created an issue. See original summary.

karenann’s picture