Merge pull request #14724 from nextcloud/enh/nonce_for_iframes
CSP: set nonce for iframes
This commit is contained in:
commit
458359563b
1 changed files with 5 additions and 1 deletions
|
@ -468,7 +468,11 @@ class EmptyContentSecurityPolicy {
|
|||
}
|
||||
|
||||
if(!empty($this->allowedFrameDomains)) {
|
||||
$policy .= 'frame-src ' . implode(' ', $this->allowedFrameDomains);
|
||||
$policy .= 'frame-src ';
|
||||
if(is_string($this->useJsNonce)) {
|
||||
$policy .= '\'nonce-' . base64_encode($this->useJsNonce) . '\' ';
|
||||
}
|
||||
$policy .= implode(' ', $this->allowedFrameDomains);
|
||||
$policy .= ';';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue