We need an upload facility on the company (Linux/Apache) site so that we can provide files (primarily PDFs) of leaflets, and wiring diagrams and, occasionally CAD. The files will be uploaded from an area protected with a password and username (using .htaccess). In all cases, we are planning for the files to be zipped.
Now, although the upload page will be accessible only by trusted members of staff, I can do paranoid. OTOH Full-blooded security needs quite an effort[Link to a PDF].
I have thought that I could check if the files have the .zip extension with something like:
$filename = 'afile.zip';
$ext = pathinfo($filename, PATHINFO_EXTENSION);
and rely on that.
Easy - but the questions are:
Are file with .zip extensions inherently safe from being exploited to hack the site?
What would you do?