πŸ‡ΊπŸ‡ΈUnited States @spfaffly

Account created on 20 February 2013, almost 12 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States spfaffly

spfaffly β†’ changed the visibility of the branch 3203811-csp-domain to active.

πŸ‡ΊπŸ‡ΈUnited States spfaffly

I just noticed the hook_csp_policy_alter function. I was able to append using that hook by adding this function:

function hook_csp_policy_alter(Csp $policy, Response $response) {
  // Add nonce value to CSP.
  /** @var \Drupal\csp\PolicyHelper $policy_helper */
  $policy_helper = \Drupal::service('csp.policy_helper');
  $policy_helper->appendNonce($policy, 'script', ['unsafe-inline']);
}

And then anywhere I needed to add the nonce value in my theme I used the Nonce service:

  // Generate a nonce for CSP.
  /** @var \Drupal\csp\Nonce $nonce_service */
  $nonce_service = \Drupal::service('csp.nonce');
  $nonce_value = $nonce_service->getValue();
πŸ‡ΊπŸ‡ΈUnited States spfaffly

Tested #10 as well on Drupal 10.2.2 and works great. Thanks!

πŸ‡ΊπŸ‡ΈUnited States spfaffly

@gisle You're welcome.

I've come across a similar issue and figured this would be the best approach.

This MR basically has a check if the current user has the permission of "access administration pages" and displays that message accordingly.

Any users that don't have this permission won't see this message.

πŸ‡ΊπŸ‡ΈUnited States spfaffly

spfaffly β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States spfaffly

Applied the patch to original branch + latest 9.3.x dev branch.

πŸ‡ΊπŸ‡ΈUnited States spfaffly

Created a MR to apply the rector fixes + increment the info files to allow D10 installation.

πŸ‡ΊπŸ‡ΈUnited States spfaffly

spfaffly β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States spfaffly

Trying to reroll the patch against the dist version (since there isn't a dev branch?)

πŸ‡ΊπŸ‡ΈUnited States spfaffly

Adding a patch file based on the above changes here since the patch file created in the MR didn't apply for some reason.

πŸ‡ΊπŸ‡ΈUnited States spfaffly

Using this issue as a way to reach out to these future niche use cases as previous versions of this module supported it.

You can close out this issue.

I'll take a look at the generator route when time permits - thanks for your insight!

πŸ‡ΊπŸ‡ΈUnited States spfaffly

Probably not the best solution but commenting out the offending code for now at least gives us a path forward to an installable state.

Patch file attached.

Production build 0.71.5 2024