diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-01-25 21:04:07 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-01-25 21:04:21 +0100 |
commit | 6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5 (patch) | |
tree | 28aea39d85e63a901744c6319f6dc06884040daf /process_bug.cgi | |
parent | ec963661fb29c191fec645a956cbddc670cfa3da (diff) | |
download | bugzilla-6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5.tar.gz bugzilla-6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5.tar.xz |
Bug 1286290 - CSP compliant bug modal
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 8 |
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; |