]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1294587 - The CSP feature is broken
authorDylan William Hardison <dylan@hardison.net>
Wed, 7 Sep 2016 23:35:31 +0000 (19:35 -0400)
committerDylan William Hardison <dylan@hardison.net>
Wed, 7 Sep 2016 23:35:31 +0000 (19:35 -0400)
r=dkl

Bugzilla/CGI.pm

index 88dfeb4d26752ec9c99048c7567ea59fcea32355..d43a68f93c76970ac05b3237020c0c4552c603b4 100644 (file)
@@ -109,13 +109,12 @@ sub new {
 }
 
 sub content_security_policy {
-    my ($self) = @_;
+    my ($self, %add_params) = @_;
     if (Bugzilla->has_feature('csp')) {
         require Bugzilla::CGI::ContentSecurityPolicy;
         return $self->{Bugzilla_csp} if $self->{Bugzilla_csp};
         my %params = DEFAULT_CSP;
-        if (@_) {
-            my %add_params = @_;
+        if (%add_params) {
             foreach my $key (keys %add_params) {
                 if (defined $add_params{$key}) {
                     $params{$key} = $add_params{$key};