Skip to content

Commit

Permalink
Merge pull request #61 from danieltott/patch-1
Browse files Browse the repository at this point in the history
Add 'url' type value for report-uri
  • Loading branch information
paragonie-security authored Jan 28, 2023
2 parents 1a1a85f + f580025 commit a324e23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CSPBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function compile(): string
if (!is_string($this->policies['report-uri'])) {
throw new TypeError('report-uri policy somehow not a string');
}
$compiled [] = 'report-uri ' . $this->enc($this->policies['report-uri']) . '; ';
$compiled [] = 'report-uri ' . $this->enc($this->policies['report-uri'], 'url') . '; ';
}
if (!empty($this->policies['report-to'])) {
if (!is_string($this->policies['report-to'])) {
Expand Down

0 comments on commit a324e23

Please sign in to comment.