mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 23:08:08 +08:00
Bugfix: Undefined index: HTTP_USER_AGENT
This commit is contained in:
parent
577c5f426e
commit
c7b1a92ebf
1 changed files with 1 additions and 1 deletions
|
@ -215,7 +215,7 @@ class Service
|
|||
$sContentSecurityPolicy = \preg_replace('/(img-src[^;]+)\\shttp:(\\s|;|$)/D', '$1$2', $sContentSecurityPolicy);
|
||||
}
|
||||
// Internet Explorer does not support 'nonce'
|
||||
if (!\strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/') && !\strpos($_SERVER['HTTP_USER_AGENT'], 'Edge/1')) {
|
||||
if (!isset($_SERVER['HTTP_USER_AGENT']) || (!\strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/') && !\strpos($_SERVER['HTTP_USER_AGENT'], 'Edge/1'))) {
|
||||
if ($sScriptNonce) {
|
||||
$sContentSecurityPolicy = \str_replace('script-src', "script-src 'nonce-{$sScriptNonce}'", $sContentSecurityPolicy);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue