aboutsummaryrefslogtreecommitdiff
path: root/mail/lib/validateattachment
diff options
context:
space:
mode:
Diffstat (limited to 'mail/lib/validateattachment')
-rwxr-xr-xmail/lib/validateattachment4
1 files changed, 4 insertions, 0 deletions
diff --git a/mail/lib/validateattachment b/mail/lib/validateattachment
index d21044f3..74018d0e 100755
--- a/mail/lib/validateattachment
+++ b/mail/lib/validateattachment
@@ -54,6 +54,10 @@ case *'zip archive'*
# but the errors look like
# unzip: reading data for philw.doc.scr failed: ...
# so we can still catch these.
+ if(! unzip -tsf $file >[2=1] >/dev/null){
+ echo corrupt zip file!
+ exit $discard
+ }
if(unzip -tsf $file >[2=1] | grep -si ' |\.(scr|exe|pif|bat|com)$'){
echo executables inside zip file!
exit $discard