Restrict map tile url to https protocol
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
This commit is contained in:
parent
e781d75a1e
commit
76be859196
@ -419,7 +419,7 @@ class Header
|
||||
/** Get the Content-Security-Policy header */
|
||||
private function getCspHeader(): string
|
||||
{
|
||||
$mapTileUrl = ' tile.openstreetmap.org';
|
||||
$mapTileUrl = ' https://tile.openstreetmap.org';
|
||||
$cspAllow = $this->config->config->CSPAllow === '' ? '' : ' ' . $this->config->config->CSPAllow;
|
||||
$captchaUrl =
|
||||
$this->config->config->CaptchaLoginPrivateKey === '' ||
|
||||
|
||||
@ -226,7 +226,7 @@ class HeaderTest extends AbstractTestCase
|
||||
'',
|
||||
'',
|
||||
"default-src 'self';"
|
||||
. " img-src 'self' data: tile.openstreetmap.org;"
|
||||
. " img-src 'self' data: https://tile.openstreetmap.org;"
|
||||
. " object-src 'none';"
|
||||
. " script-src 'self' 'unsafe-inline' 'unsafe-eval';"
|
||||
. " style-src 'self' 'unsafe-inline';"
|
||||
@ -239,7 +239,8 @@ class HeaderTest extends AbstractTestCase
|
||||
'PublicKey',
|
||||
'captcha.tld csp.tld',
|
||||
"default-src 'self' captcha.tld csp.tld example.com example.net;"
|
||||
. " img-src 'self' data: captcha.tld csp.tld example.com example.net tile.openstreetmap.org;"
|
||||
. " img-src 'self' data: captcha.tld csp.tld example.com example.net"
|
||||
. ' https://tile.openstreetmap.org;'
|
||||
. " object-src 'none';"
|
||||
. " script-src 'self' 'unsafe-inline' 'unsafe-eval' captcha.tld csp.tld example.com example.net;"
|
||||
. " style-src 'self' 'unsafe-inline' captcha.tld csp.tld example.com example.net;"
|
||||
@ -252,7 +253,7 @@ class HeaderTest extends AbstractTestCase
|
||||
'PublicKey',
|
||||
'captcha.tld csp.tld',
|
||||
"default-src 'self' captcha.tld csp.tld;"
|
||||
. " img-src 'self' data: captcha.tld csp.tld tile.openstreetmap.org;"
|
||||
. " img-src 'self' data: captcha.tld csp.tld https://tile.openstreetmap.org;"
|
||||
. " object-src 'none';"
|
||||
. " script-src 'self' 'unsafe-inline' 'unsafe-eval' captcha.tld csp.tld;"
|
||||
. " style-src 'self' 'unsafe-inline' captcha.tld csp.tld;",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user