diff options
author | Max Magorsch <arzano@gentoo.org> | 2020-05-08 21:53:03 +0200 |
---|---|---|
committer | Max Magorsch <arzano@gentoo.org> | 2020-05-08 21:53:03 +0200 |
commit | d1ca3da748592b0d00d5ff53652a9347b7daf430 (patch) | |
tree | ef14b2f7d8facdaedd525924eb2eb9e468ca97b6 | |
parent | Enable the AttachmentFilter (diff) | |
download | bugzilla-d1ca3da748592b0d00d5ff53652a9347b7daf430.tar.gz bugzilla-d1ca3da748592b0d00d5ff53652a9347b7daf430.tar.bz2 bugzilla-d1ca3da748592b0d00d5ff53652a9347b7daf430.zip |
AttachmentFilter: Exclude php files as wellgentoo-5.0.6.9
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r-- | extensions/AttachmentFilter/Extension.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/extensions/AttachmentFilter/Extension.pm b/extensions/AttachmentFilter/Extension.pm index e0726b9c9..35e22c99c 100644 --- a/extensions/AttachmentFilter/Extension.pm +++ b/extensions/AttachmentFilter/Extension.pm @@ -12,14 +12,17 @@ use strict; use base qw(Bugzilla::Extension); use Bugzilla::Error; -our $VERSION = '0.01'; +our $VERSION = '0.02'; ################################################################################ # This extension is filtering attachments. Currently its is filtering html # attachments. ################################################################################ sub attachment_process_data { my ($self, $args) = @_; - return unless ( ($args->{attributes}->{mimetype} eq 'text/html') or ($args->{attributes}->{filename} =~ /\.htm\z/) or ($args->{attributes}->{filename} =~ /\.html\z/) ); + return unless ($args->{attributes}->{mimetype} eq 'text/html') or + ($args->{attributes}->{filename} =~ /\.htm\z/) or + ($args->{attributes}->{filename} =~ /\.html\z/) or + ($args->{attributes}->{filename} =~ /\.php\z/); ${$args->{data}} = ''; $args->{attributes}->{filename} = ''; |