Problem/Motivation
For compatibility with persistent app servers, CSP 2.3 no longer stores the nonce value for a request in a static variable which would persist across requests and instead stores it in an attribute on the main request. If the value is attempted to be used before the request is available, an exception is thrown since it is unable to be stored.
Because kint.module attempts to use the value when the file is loaded, before the request is initialized, all requests to the site - both through a browser and drush - fail with an exception.
Steps to reproduce
Enable CSP module ^2.3.0 and Kint module on a site.
Proposed resolution
Move initializing the nonce value for Kint to use to a KernelEvents::REQUEST subscriber.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork kint-3641390
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
gappleComment #5
jnvsor commentedComment #7
jnvsor commentedReleased in 2.3.6