diff options
author | Russ Cox <rsc@swtch.com> | 2007-11-27 15:39:06 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2007-11-27 15:39:06 -0500 |
commit | 83ab7d88962d717ca5729e7337706b6e4da48af6 (patch) | |
tree | 2dcaeba8fec383733357f4db5e9c2d0718767838 /mail | |
parent | 00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff) | |
parent | 00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff) | |
download | plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.gz plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.bz2 plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.zip |
merge
Diffstat (limited to 'mail')
-rwxr-xr-x | mail/lib/validateattachment | 4 |
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 |