Hi,
I have some issues with the simple task of banning some file types in AmaVis-New and I just cannot figure out why it is not working the way it should. Basically, I want to completly block RAR and ZIP files. However, they still come through even though I did specify them in the "Blocked Everywhere" section. I just cannot figure out why they are still coming in. I think I probably miss something simple, but I searched everywhere, and I just get the simply outline on how to specify it in the config. However, in my case all is specified, but it just does not work. Everything else does work and running AmaVis in debug mode does not show any errors. So I guess I have some issue where I maybe specified the ban wrong. I have posted the excerpt of the config that is dealing with the file banning below. Maybe I am missing something. I really appreciate any comment or assistance on this.
$banned_filename_re = new_RE(
### BLOCKED ANYWHERE
qr'^UNDECIPHERABLE$', # is or contains any undecipherable components
qr'^\.(exe-ms|dll)$', # banned file(1) types, rudimentary
qr'^\.(exe|lha|cab|dll)$',
# banned file(1) types
qr'^\.(zip|rar)$', # banned file(1) types
qr'^\.(docm|arc|jar)$', # banned file(1) types
### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:
# [ qr'^\.(gz|bz2)$' => 0 ], # allow any in gzip or bzip2
[ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow any in Unix-type archives
qr'.\.(pif|scr)$'i, # banned extensions - rudimentary
qr'^\.zip$', # block zip type
### BLOCK THE FOLLOWING, EXCEPT WITHIN ARCHIVES:
# [ qr'^\.(zip|rar|arc|arj|zoo
)$'=> 0 ], # allow any within these archives
qr'^application/x-msdownlo
ad$'i, # block these MIME types
qr'^application/x-msdos-pr
ogram$'i,
qr'^application/hta$'i,
# qr'^message/partial$'i, # rfc2046 MIME type
# qr'^message/external-body$
'i, # rfc2046 MIME type
# qr'^(application/x-msmetaf
ile|image/
x-wmf)$'i,
# Windows Metafile MIME type
# qr'^\.wmf$', # Windows Metafile file(1) type
# block certain double extensions in filenames
qr'^(?!cid:).*\.[^./]*[A-Z
a-z][^./]*
\.\s*(exe|
vbs|pif|sc
r|bat|cmd|
com|cpl|dl
l)[.\s]*$'
i,
# qr'\{[0-9a-f]{8}(-[0-9a-f]
{4}){3}-[0
-9a-f]{12}
\}?'i, # Class ID CLSID, strict
# qr'\{[0-9a-z]{4,}(-[0-9a-z
]{4,}){0,7
}\}?'i, # Class ID extension CLSID, loose
# qr'.\.(exe|vbs|pif|scr|cpl
)$'i, # banned extension - basic
# qr'.\.(exe|vbs|pif|scr|cpl
|bat|cmd|c
om)$'i, # banned extension - basic+cmd
qr'.\.(ade|adp|app|bas|bat
|chm|cmd|c
om|cpl|crt
|emf|exe|f
xp|grp|hlp
|hta|
inf|ini|ins|isp|js|jse|lib
|lnk|mda|m
db|mde|mdt
|mdw|mdz|m
sc|msi|
msp|mst|ocx|ops|pcd|pif|pr
g|reg|scr|
sct|shb|sh
s|sys|vb|v
be|vbs|vxd
|
wmf|wsc|wsf|wsh|rar|zip)$'
ix, # banned extensions - long
# qr'.\.(asd|asf|asx|url|vcs
|wmd|wmz)$
'i, # consider also
qr'.\.(ani|cur|ico)$'i, # banned cursors and icons filename
# qr'^\.ani$', # banned animated cursor file(1) type
qr'.\.(mim|b64|bhx|hqx|xxe
|uu|uue)$'
i, # banned extension - WinZip vulnerab.
);
# See
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631
# and
http://www.cknow.com/vtutor/vtextensions.htm