From 6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 25 Jan 2017 15:04:07 -0500 Subject: Bug 1286290 - CSP compliant bug modal --- process_bug.cgi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'process_bug.cgi') 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; -- cgit v1.2.3-24-g4f1b