Capture all file uploads and pass through scanner

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Capture all file uploads and pass through scanner

Post 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?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Capture all file uploads and pass through scanner

Post 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.
(#10850)
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Re: Capture all file uploads and pass through scanner

Post by jmut »

I mean like if I have hosting solution...with auto_prepend to run php script that does this transperant to applications.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Capture all file uploads and pass through scanner

Post by Christopher »

Certainly an auto_prepend script could check $_FILES and check/move any uploaded files.
(#10850)
Post Reply