Answer the question
In order to leave comments, you need to log in
How much will the principle of storing images on another server increase the security of the site?
I read a lot about the fact that when users upload pictures, you can often pick up a malicious script (shell, backdoor, etc.), but if I store all the pictures on a completely different server with a different domain and in general on different hosting accounts - how much will this help protect the software part the engine itself?
Well, another question on the topic - why on many sites it is forbidden to upload gifs, although you can embed a piece of php code in a jeep?
Answer the question
In order to leave comments, you need to log in
Pictures can use three types of vulnerabilities:
1. In your server settings. If you can upload a picture and refer to it, and it will remain unchanged and may not be a picture, but a script that will be executed on the server. It is eradicated by checking MIME and returning static without processing.
2. In the user's libraries (old versions of libpng, for example). It almost never occurs in the wild, but if you like, you can transcode files using ImageMagick.
In practice, we find that checking MIME and transcoding IM solves all your problems. At the same time, one more thing - you will not be piled up with files of such a size that the hosting space will suddenly run out.
3. And here the third option pops up: attacking IM itself with all sorts of formats that support external links. It is eradicated by limiting what can be downloaded and processed at all, PNG and JPG, and then processing them with IM.
And taking it to another server is about nothing at all. Just increase the lags. They do this for very high-load projects ... but they don’t ask such questions there either ;)
I read a lot about the fact that when users upload images, you can often pick up a malicious script (shell, backdoor, etc.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question