summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-01-25 21:04:07 +0100
committerDylan William Hardison <dylan@hardison.net>2017-01-25 21:04:21 +0100
commit6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5 (patch)
tree28aea39d85e63a901744c6319f6dc06884040daf /process_bug.cgi
parentec963661fb29c191fec645a956cbddc670cfa3da (diff)
downloadbugzilla-6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5.tar.gz
bugzilla-6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5.tar.xz
Bug 1286290 - CSP compliant bug modal
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi8
1 files changed, 5 insertions, 3 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 0858a3ff8..ac8e32c53 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -419,9 +419,12 @@ my $format_params = {
ctype => scalar $cgi->param('ctype'),
};
Bugzilla::Hook::process('show_bug_format', $format_params);
+if ($format_params->{format} eq 'modal') {
+ $cgi->content_security_policy(Bugzilla::CGI::SHOW_BUG_MODAL_CSP());
+}
my $format = $template->get_format("bug/show",
- $format_params->{format},
- $format_params->{ctype});
+ $format_params->{format},
+ $format_params->{ctype});
if (Bugzilla->usage_mode != USAGE_MODE_EMAIL) {
print $cgi->header();
@@ -466,5 +469,4 @@ if (Bugzilla->usage_mode != USAGE_MODE_EMAIL) {
$template->process("global/footer.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
-
1;