Depending on how you disable scripting, not everything might actually be turned off (i.e. in Apache, if you disable CGI scripts, you might still have PHP switched on, etc.) Just make sure you really turned it all off, or serve the files via another script.
Taint mode in IIS (and maybe some other web servers) can AFAIK not be turned on via the shebang line, you probably need to switch it on in the server config somewhere (haven't done this in years, so I can't remember how exactly). If you turn it on in the server, scripts using perl -wT should run fine too.
As for file types, not reliably. Check for extensions and mime-type, but people can always fake it. File::MimeInfo::Magic might be useful.
edit: oh yes, I overlooked the binmode in your script. I think it's fine like that.
Hope this helps.
Joost.
In reply to Re: Re: Re: Security Uploading Files
by Joost
in thread Security Uploading Files
by bkiahg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |