Welcome to WebmasterWorld Guest from 188.8.131.52
I allow my members to upload images to my website from their PC. A member has request a feature where he can upload his images from his website.
I find this feature to be very interesting as I see many of my members having their images already on other websites and by enabling this feature I can encourage them to use their images from my competitor sites on my site.
So looking away from the legal issues, what security concerns can there be in my server trying to do a HTTP GET on a URL the member provided ?
Of course I will be validating the following:
1. transport is http
2. the extension is .jpg
3. The file downloaded is not larger than X Megabytes
4. The file is a valid jpg image file
Thanks in advance
The only difference, is that instead of the file coming directly from your user (file upload), it is now coming directly from a 3rd party web server.
Employ the same basic security guidelines to handle the file. The 4 things you mention are all good steps. Try Googling "PHP file upload security" for more specific concerns about uploading user files onto your system.
what security concerns can there be in my server trying to do a HTTP GET on a URL the member provided ?
If so then we have
Link to the image:
Here are few things that can be done.
Once the image link is set to your site member changes the content of the image to some adult content only for some ips or only on a specific time of the day.
Another case is he can set an authorization script inside hist /image folder that rotates. Now some members of your site will see a popup dialog prompting them to enter their credentials. Just use your imagination possibilities are unlimited.
So make sure of at least 2 things.
1. Make sure they upload the image files to your server (no hot-linking)
2. Validate the images.
And when push comes to shove I want my users to send me the images direct rather than point to a third party (where's the audit trail in that!)?
But if you have your server to automatically downloads them, stores them and then are accessible without validation is no different than the hot-linking problems mentioned above.