diff options
author | 2020-05-06 23:41:03 +0200 | |
---|---|---|
committer | 2020-05-06 23:41:03 +0200 | |
commit | 485dc6b8e817ebb2eb131181baa6c69b6e3fa75e (patch) | |
tree | 7f009b40c17242318bb01f5bfec3b20da2c2ef23 | |
parent | Add the AttachmentFilter extension (diff) | |
download | bugzilla-485dc6b8e817ebb2eb131181baa6c69b6e3fa75e.tar.gz bugzilla-485dc6b8e817ebb2eb131181baa6c69b6e3fa75e.tar.bz2 bugzilla-485dc6b8e817ebb2eb131181baa6c69b6e3fa75e.zip |
Add user error message for illegal html attachmentsgentoo-5.0.6.6
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r-- | extensions/AttachmentFilter/Extension.pm | 1 | ||||
-rw-r--r-- | template/en/default/global/user-error.html.tmpl | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/extensions/AttachmentFilter/Extension.pm b/extensions/AttachmentFilter/Extension.pm index 1d316901e..a56f7ca77 100644 --- a/extensions/AttachmentFilter/Extension.pm +++ b/extensions/AttachmentFilter/Extension.pm @@ -23,6 +23,7 @@ sub attachment_process_data { ${$args->{data}} = ''; $args->{attributes}->{filename} = ''; + ThrowUserError("illegal_html_attachment"); } __PACKAGE__->NAME; diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index cc1ad1994..63655b926 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -903,7 +903,11 @@ [% title = "Unauthorized Action" %] You are not authorized to edit attachments on [% terms.bug %] [%+ bug_id FILTER html %]. - + + [% ELSIF error == "illegal_html_attachment" %] + [% title = "Unauthorized Action" %] + You are not authorized to add html attachments. + [% ELSIF error == "illegal_bug_status_transition" %] [% title = "Illegal $terms.Bug Status Change" %] [% IF old.defined %] |