DevSnips.com Code Snippet Repository
search:    


Navigation
  Home
About
Library
Contact
 
Snippet Library
  ColdFusion   338  
  ASP   201  
  PHP   101  
  HTML   11  
  JavaScript   77  
  XML   2  
  CSS   5  
  SQL   13  
  JSP   2  
  C#   1  
  ASP.NET   0  
  Submit a Code Snippet
 
Blog Archive
  September 2007
August 2007
July 2007
June 2007
May 2007
November 2006
October 2006
Search Archives
 
Random Affiliates
  ReviewMe!
PHP Arch
Tom Morris
BioMetric Base

Want to become an affiliate?
Read more...


Privacy Policy
© 2008

Blog Archive

 
10 Things you can do to protect file uploads via PHP on your Linux / Apache web server

Today I came across an awesome article/tip on how to improve security for uploads using PHP and a Apache/Linux server. The site is called Uno-Code.com which is a great server administration blog. It's discusses Linux related items pretty heavily, specfically Gentoo Linux, so it might not be for everyone.

The article touches on some great security points. Mostly the idea of having multiple security layers to protect your application and/or server. I'll be writing a article in the near future about comment SPAM and techniques to help stop that. But, I believe in the multi-layer approach, since each layer is not full proof against attacks.

The article discusses mod_security and the new hardened PHP module/project called Suhosin to help verify files before moving further with the code. Also, it talked about the 'type' value in the $_FILES array. I've had this discussion countless of times with other programmers. This should NEVER be trusted since it's actually set from the browser to the server. Anything from the client should NEVER be trusted, since they can change that value.

Everyone should take a look at these points, you might have an idea to improve your security strategy in relation to file uploads. File uploads can be dangerous, so any thing to help lock that down is a good thing!


Submitted on 08/08/07 at 10:08AM
Post Comment | Comments: 0
Bookmark to:
Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Del.icio.us Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to digg Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to FURL Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to blinklist Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to reddit Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Feed Me Links Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Technorati Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Yahoo My Web Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Newsvine Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Socializer Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Ma.gnolia Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Stumble Upon Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Google Bookmarks Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to RawSugar Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Squidoo Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Spurl Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to BlinkBits Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Netvouz Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Rojo Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Blogmarks Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Shadows Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Simpy Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Co.mments Add '10 Things you can do to protect file uploads via PHP on your Linux / Apache web server' to Scuttle

Go Back








Advertisements

GoToMeeting - Online Meetings Made Easy