Results 1 to 6 of 6

Thread: Uploading files

  1. #1
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Uploading files

    I'm on the lookout for a way for clients to upload drawings to our server but before I go ahead is there any security issues I should be aware of. What if a file containing a virus is uploaded? Any comments please.

  2. #2
    Join Date
    Aug 2008
    Location
    Smiths, AL
    Posts
    164
    Thanks
    30
    Thanked 5 Times in 5 Posts

    Default

    I am actually working on one of these now. There are a ton of code snippets out there but to find one that works for you is more than likely going to be a little rare.

    Although with a little bit of knowledge you can take a snippet and edit it for your application.

    With PHP you should always take precautions when allowing the world to upload to your server. I would restrict your uploads by size and extensions, ie. jpeg, bmp, jpg, png, and so on.
    ___________________________________

    Still working on it!

  3. #3
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default

    Thanks for that.

    If uploading is restricted to image files, as suggested, does this stop viruses?

  4. #4
    Join Date
    Feb 2009
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    It may seem a bit extensive, but Menalto's open source Gallery software is fantastic.

    ACC

  5. #5
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    No that won't stop viruses but will limit them somewhat.

  6. #6
    Join Date
    Dec 2008
    Location
    Portsmouth UK
    Posts
    23
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    As suggested already, restricting the file extensions would be the best step toward stopping any potential viruses.

    A way to be even more certain that i particular upload does not contain any such viruses is to use a file scanner, even your everyday anti-virus scans files before downloading. Although the results can never be 100% certain these steps can dramatically reduce your risk.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •