mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
fix: Use CSP_NONCE env variable in ContentSecurity Header
We should use 'cspNonceManager' for requesting the NONCE value, because it is doing the same as before, except that it honors a CPS_NONCE environment variable if available. Signed-off-by: Holger Hees <holger.hees@gmail.com>
This commit is contained in:
parent
21db618174
commit
73397cd759
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ class CSPMiddleware extends Middleware {
|
|||
$defaultPolicy = $this->contentSecurityPolicyManager->mergePolicies($defaultPolicy, $policy);
|
||||
|
||||
if ($this->cspNonceManager->browserSupportsCspV3()) {
|
||||
$defaultPolicy->useJsNonce($this->csrfTokenManager->getToken()->getEncryptedValue());
|
||||
$defaultPolicy->useJsNonce($this->cspNonceManager->getNonce());
|
||||
}
|
||||
|
||||
$response->setContentSecurityPolicy($defaultPolicy);
|
||||
|
|
|
|||
Loading…
Reference in a new issue