mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Prevent base-uri injection
This commit is contained in:
parent
6a90c62456
commit
852c122e56
1 changed files with 2 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ namespace SnappyMail\HTTP;
|
|||
class CSP
|
||||
{
|
||||
public
|
||||
$base = ["'self'"],
|
||||
$default = ["'self'"],
|
||||
// Knockout.js requires unsafe-inline?
|
||||
// Knockout.js requires eval() for observable binding purposes
|
||||
|
|
@ -34,6 +35,7 @@ class CSP
|
|||
function __toString() : string
|
||||
{
|
||||
$params = [
|
||||
'base-uri ' . \implode(' ', $this->base),
|
||||
'default-src ' . \implode(' ', $this->default)
|
||||
];
|
||||
if ($this->script) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue