From: Kohei Yoshino Date: Fri, 29 Mar 2019 03:22:47 +0000 (-0400) Subject: Bug 1535190 - Make sure inline attachments are displayed properly X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1703737774717cf9f0732d368f69cf2ac51cd64;p=thirdparty%2Fbugzilla.git Bug 1535190 - Make sure inline attachments are displayed properly --- diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 1656a869b..f2a3b7358 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -89,6 +89,7 @@ sub SHOW_BUG_MODAL_CSP { 'https://www.google-analytics.com' ], img_src => ['self', 'https://secure.gravatar.com'], + media_src => ['self'], connect_src => [ 'self', @@ -113,6 +114,7 @@ sub SHOW_BUG_MODAL_CSP { my $attach_base = Bugzilla->localconfig->{'attachment_base'}; $attach_base =~ s/\%bugid\%/$bug_id/g; push @{$policy{img_src}}, $attach_base; + push @{$policy{media_src}}, $attach_base; } return %policy; diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl index 2661e256a..b66188e66 100644 --- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl @@ -258,7 +258,7 @@ [% IF comment.type == constants.CMT_ATTACHMENT_CREATED %] [% att = comment.attachment; link = 'attachment.cgi?id=' _ att.id %]