From: Kohei Yoshino Date: Mon, 8 Apr 2019 20:54:29 +0000 (-0400) Subject: Bug 1542882 - Don't do image preview on security bugs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=201c90be033ef7209c78f09e30b54e384762fa76;p=thirdparty%2Fbugzilla.git Bug 1542882 - Don't do image preview on security bugs --- diff --git a/extensions/BugModal/web/comments.js b/extensions/BugModal/web/comments.js index 359612916..ed9c91bf7 100644 --- a/extensions/BugModal/web/comments.js +++ b/extensions/BugModal/web/comments.js @@ -523,9 +523,10 @@ Bugzilla.BugModal.Comments = class Comments { * @see https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API */ prepare_inline_attachments() { - // Check the connectivity, API support, user setting and sensitive keywords + // Check the connectivity, API support, user setting, bug security and sensitive keywords if ((navigator.connection && navigator.connection.type === 'cellular') || typeof IntersectionObserver !== 'function' || !BUGZILLA.user.settings.inline_attachments || + BUGZILLA.bug_secure || BUGZILLA.bug_keywords.split(', ').find(keyword => keyword.match(/^(hang|assertion|crash)$/))) { return; }