Page 1 of 1

Capture all file uploads and pass through scanner

Posted: Thu Sep 11, 2008 3:32 pm
by jmut
Hi, I am wondering is it possible with php to handle all file uploads, e.g using auto_prepend directive in php.ini, validate those files if ok or not, and invalidate them accordingly?

Re: Capture all file uploads and pass through scanner

Posted: Thu Sep 11, 2008 3:59 pm
by Christopher
I'm not sure what "e.g using auto_prepend directive in php.ini" means, but you can certainly use PHP to "handle all file uploads" and "validate those files if ok or not, and invalidate them accordingly".

FYI - Uploaded files are written to temporary filenames. If you don't explicitly move the uploaded files they will be deleted at the end of the request.

Re: Capture all file uploads and pass through scanner

Posted: Fri Sep 12, 2008 6:39 am
by jmut
I mean like if I have hosting solution...with auto_prepend to run php script that does this transperant to applications.

Re: Capture all file uploads and pass through scanner

Posted: Fri Sep 12, 2008 12:58 pm
by Christopher
Certainly an auto_prepend script could check $_FILES and check/move any uploaded files.