Bug 1294587 - The CSP feature is broken

r=dkl
parent 19470799
...@@ -109,13 +109,12 @@ sub new { ...@@ -109,13 +109,12 @@ sub new {
} }
sub content_security_policy { sub content_security_policy {
my ($self) = @_; my ($self, %add_params) = @_;
if (Bugzilla->has_feature('csp')) { if (Bugzilla->has_feature('csp')) {
require Bugzilla::CGI::ContentSecurityPolicy; require Bugzilla::CGI::ContentSecurityPolicy;
return $self->{Bugzilla_csp} if $self->{Bugzilla_csp}; return $self->{Bugzilla_csp} if $self->{Bugzilla_csp};
my %params = DEFAULT_CSP; my %params = DEFAULT_CSP;
if (@_) { if (%add_params) {
my %add_params = @_;
foreach my $key (keys %add_params) { foreach my $key (keys %add_params) {
if (defined $add_params{$key}) { if (defined $add_params{$key}) {
$params{$key} = $add_params{$key}; $params{$key} = $add_params{$key};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment